set outputchan "#debug"
bind raw - NOTICE server:notices
proc server:notices {from keyword text} {
global outputchan
if {[string match -nocase "*client connecting on port 66??*" $text]} {
set port [lindex [split $text] 7]
set nick [lindex [split $text] 10]
set IP [lindex [split $text] 11]
set hostmask [lindex [split $text] 12]
set real [lindex [split $text] 13]
set name [lindex [split $text] 14]
set long [lindex [split $text] 15]
set very [lindex [split $text] 16]
set loong [lindex [split $text] 17]
set final [lindex [split $text] 18]
set connectport [lindex [split $text] 7]
putquick "PRIVMSG $outputchan 25server\002:\003 $nick \0021IP-real\002: $IP \0021RN\002 $hostmask $real $name $long $very $loong $final \0021Port:\002 $port \002"
return 0
}
}
I think the way you parse the string could be change using a regexp.
I don't know exactly how is the text you get, so I can't write it. Could you provide 2 complete connect string to let me help you ?
The alternative should be to change the way you set IP and realname:
set outputchan "#debug"
bind raw - NOTICE server:notices
proc server:notices {from keyword text} {
global outputchan
if {[string match -nocase "*client connecting on port 66??*" $text]} {
set port [lindex [split $text] 7]
set nick [lindex [split $text] 10]
set IP [string range [lindex [split $text] 11] 1 end-1]
set hostmask [lindex [split $text] 12]
set realname [string range [join [lrange [split text] 13 18]] 1 end-1]
set connectport [lindex [split $text] 7]
putquick "PRIVMSG $outputchan 25server\002:\003 $nick \0021IP-real\002: $IP \0021RN\002 $hostmask $realname \0021Port:\002 $port \002"
return 0
}
}
[23:22] -irc.server.net- *** CONNECT: Client connecting on port 6667 (class irc): mlel0d_b0b!nogc@187.208.208.17 (187.208.208.17) [onoq]
[23:22] -irc.server.net- *** CONNECT: Client connecting on port 6667 (class irc): CiSimca__!lbvd@187.147.53.21 (187.147.53.21) [khlvu]
[23:22] -irc.server.net- *** CONNECT: Client connecting on port 6667 (class irc): SePettern!kjop@187.213.249.32 (187.213.249.32) [lpw]
[23:22] -irc.server.net- *** CONNECT: Client connecting on port 6667 (class irc): CiKibbo!uix@187.232.48.93 (187.232.48.93) [euk]
I post some examples of connection to the server.
Right now the real ip does not show the brackets ( )
But the realname does appear in square brackets [ ] .
CrazyCat, thank you very much for your work and time.
Looking at the code with another previous one that you helped me, I did not think that I could put almost the same ...
Again, thank you very much .
Ohh Simo, I haven't seen your code until now...
Anope services is too log.
With this I only see what enters the chat to act on certain occasions.
Thank you very much, I'm going to test.
PD: where do I find the list of colors to play with colors?