Your bot is receiving the RAW 353 as an automatic response from the server when joining a channel, and not as a consequence of the code within your join proc. Your join proc does not work for any user INCLUDING the bot.
Code: Select all
if {$chan == "humannature"} {
# code here
}
In the above statement, there is no # in front of the channel name and in any case it is inadvisable to use such an equality test because it does not allow for differences in case. For example, the bot may know the channel as #Humanature rather than #humanature.
The following equality test is better
Code: Select all
if {[string equal -nocase $chan #humanature]} {
# code here
}
You might also want to prevent the code from triggering when the bot joins, since it will receive the RAW 353 automatically anyway.
The following code should work
Code: Select all
bind JOIN - * pUserJoin
bind RAW - 353 pRaw353
proc pUserJoin {nick uhost hand chan} {
if {![isbotnick $nick]} {
if {[string equal -nocase $chan #humanature]} {
putserv "NAMES $chan"
}
}
return 0
}
proc pRaw353 {from keyword text} {
putserv "PRIVMSG #humanature :$text"
return 0
}
putlog "\037BlaBOh tcl by Zio_ruo\037"
Alternatively you could have put the channel name in the JOIN bind mask. If I am not mistaken this is not case sensitive. There is good reason for this. The command 'string equal' is from the Core Tcl language where there is no concept of what an IRC channel is. However, a JOIN bind and associated mask is from Eggdrop TCL where the mask is expected to begin with an IRC channel name, for which case is irrelevant.
Code: Select all
bind JOIN - "#humanature *" pUserJoin
bind RAW - 353 pRaw353
proc pUserJoin {nick uhost hand chan} {
if {![isbotnick $nick]} {
putserv "NAMES $chan"
}
return 0
}
proc pRaw353 {from keyword text} {
putserv "PRIVMSG #humanature :$text"
return 0
}
putlog "\037BlaBOh tcl by Zio_ruo\037"