ok take this one cos i understand it more, i type /sbot -o irc.server.net, then after a while it does, Socket opened on sbot, then i do /sbot -w bleh anything, and it does nothing, help?
also say i do a command with a socket bot, how is it returned? like say i do a whois on someone how do i see the return from it?
Code:
alias sbot {
  if (!$isfile(sbot.ini)) {
    writeini sbot.ini socket_bot nick sockbot
    writeini sbot.ini socket_bot socket sbot
    writeini sbot.ini socket_bot port 6667
  }
  if (-* iswm $1) {
    if ($right($1,1) == c) {
      run notepad.exe sbot.ini
      halt
    }
    if ($right($1,1) == o) {
      if (!$sock($sb(socket))) {
        if ($2) {
          sockopen $sb(socket) $2 $iif($3,$3,$sb(port))
          halt
        }
      }
    }
    if ($right($1,1) == d) {
      if ($sock($sb(socket))) {
        sockclose $sb(socket)
        halt
      }
    }
    if ($right($1,1) == w) {
      if ($sock($sb(socket))) {
        if ($2-) {
          sockwrite -n $sb(socket) $2-
        }
      }
    }
  }
}

on *:sockopen:$($sb(socket)):{
  .signal sbot SOCK_OPENED $sockname
}
on *:sockclose:$($sb(socket)):{
  .signal sbot SOCK_CLOSED $sockname
}
on *:sockwrite:$($sb(socket)):{
  .signal sbot SOCK_WRITTEN $sockname
}
on *:sockread:$($sb(socket)):{
  var %sr
  sockread %sr
  .signal sbot SOCK_READ $sockname %sr
}
on *:SIGNAL:sbot:{
  if ($1 == SOCK_OPENED) {
    echo -a Socket opened on $2
  }
  elseif ($1 == SOCK_CLOSED) {
    echo -a Socket closed on $2
  }
  elseif ($1 == SOCK_WRITTEN) {
    echo -a Wrote to socket $2
  }
  elseif ($1 == SOCK_READ) {
    echo -a Read from socket $2 $+ : $3-
  }
}



Liek OMG Yuo Stoleded my MageHurtzzzz!!!11