hey all
I have this code below:-

Code:
alias bot {
  if ($1- == $null) {
    echo -a Syntax: /bot <server>
    halt
  }
  else {
    set %server $1-
    sockopen bot %server 6667
    Echo -a Attempting connection: %server
  }
}

on 1:sockopen:bot:{
  if ($sockerr > 0) {
    sockclose $sockname
    echo -a No good, reconnecting bot!
    bot
  }
  else {
    sockwrite -n $sockname nick SocketBot
    sockwrite -n $sockname user SocketBot . . . SocketBot
  }
}

on 1:sockread:bot:{
  sockread %bot
  echo -a %bot
  ;sockwrite -n $sockname IDENT SocketBot
  if ($gettok(%bot,4,32) == :join) && ($gettok(%bot,5,32) != $null) {
    sockwrite -n $sockname join $gettok(%bot,5,32)
  }
  if ($gettok(%bot,1,32) == PING) {
    sockwrite -n $sockname pong $gettok(%bot,2,32)
  }
}


I get this result when trying to connect the bot to locahost "127.0.0.1"

Code:
Attempting connection: 127.0.0.1
:x NOTICE AUTH :*** Looking up your hostname...
:x NOTICE AUTH :*** Found your hostname (cached)
:x NOTICE AUTH :*** Checking ident...
PING :7C6A3F57
:x PRIVMSG SocketBot :VERSION
:x 465 SocketBot :*** You are not welcome on this server (Identd is required for this server.) Email x for more information.
ERROR :Closing Link: SocketBot[localhost] (You are banned)



so I added this command to send ident of bot to the server:
Code:
sockwrite -n $sockname IDENT SocketBot

on sockread , but when I uncomment it , I get this message from the server:-

Code:
Attempting connection: 127.0.0.1
:x NOTICE AUTH :*** Looking up your hostname...
:x NOTICE AUTH :*** Found your hostname (cached)
:x NOTICE AUTH :*** Checking ident...
PING :23065298
:x 451 IDENT :You have not registered
:x 451 IDENT :You have not registered
:x 451 IDENT :You have not registered
:x 451 IDENT :You have not registered
:x PRIVMSG SocketBot :VERSION
:x 465 SocketBot :*** You are not welcome on this server (Identd is required for this server.) Email x for more information.
ERROR :Closing Link: SocketBot[localhost] (You are banned)



help please..
thanks a lot.