All pastes #459719 Raw Edit

Mine

public text v1 · immutable
#459719 ·published 2007-04-26 17:19 UTC
rendered paste body
alias compare {
  if ($1 == -s) {
    set %cway msg $active
    set %cnick1 $2
    set %cnick2 $3
    set %cskill $4
    sockopen compare o-ss.net 80
  }
  else {
    set %cway echo -a
    set %cnick1 $1
    set %cnick2 $2
    set %cskill $3
    sockopen compare o-ss.net 80
  }
}
on *:sockopen:compare:{
  sockwrite -nt $sockname GET $+(/parsers/compare.php?user1=,%cnick1,&user2,%cnick2,=&skill=,%cskill) HTTP/1.1
  sockwrite -nt $sockname Host: o-ss.net
  sockwrite -nt $sockname $crlf
}
on *:sockread:compare:{
  if ($sockerr) {
    %cway Error: $sockerr
  }
  else {
    var %sred
    sockread %sred
    if (*END* iswm %sred) {
      tokenize 32 %sred
      %cway $1-
      sockclose $sockname
    }
  }
}