This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Help on bind raw notice vs bind notice

Old posts that have not been replied to for several years.
Locked
J
JudgeFred

Help on bind raw notice vs bind notice

Post by JudgeFred »

Hi all

I used chanpro1.4.tcl which it detected the channel notice, IT WORK GREAT! I also created my own script that using "bind raw - notice", IT WORK GREATE too :)
Here is my problem, when I loaded two scripts, the bot doesn't detect channel notice (chanpro1.4.tcl) but it detect server notice (mysimplescript.tcl)

the chanpro1.4.tcl used this bind: bind notc - * ban_notice
my script used this bind: bind raw - notice failed:oper

Is "bind raw - notice" will take preceded on "bind notice - "? if so, how do I fix it?

thanks
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Raw will allways come before the notice bind.

This is due to the control it gives you.

Make sure your bot isn't returning 1 for the raw bind. If it is, this is why it no longer works correctly. It would be wise to force a return 0 when needed, as in many cases, what is in the return buffer is classed as returning 1.

See tcl-commands.doc for details on the return codes (below the binds section).
J
JudgeFred

Post by JudgeFred »

in either script, it does have return 0.

Any more hint?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Maybe a look at your script will help.
J
JudgeFred

Post by JudgeFred »

Here it is:

bind raw - notice failed:oper:notc

proc failed:oper:notc { from keyword text } {
if {[string match "*Failed OPER*" $text]} {
set text [split $text]
set nick [lindex $text end-5]
putserv "kill $nick :Nice Try! / Failed Oper"
return 0
}
}
putlog "Fail oper killed - Loaded"
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Notice, you are not returning 0 after the if.

You names sake, you mgith as well move the return out of the id statment.
J
JudgeFred

Post by JudgeFred »

I moved return 0 out of the id.

}
return 0
}


still doesn't detect chan notice
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

The only other things.

1: You have another raw bind.

2: You have previously renamed the raw bind proc names. The existing one is still there, and in use, until the bot is totaly restarted.
J
JudgeFred

Post by JudgeFred »

In Chanpro1.4.tcl, here are the bind list:

bind notc - * ban_notice
bind pubm - * check_pubm
bind ctcp - ACTION check_ctcp
bind sign - * check_quit
bind part - * check_quit

and other scripts is only that bind raw - notice.

again here is the case:
if I disabled the failoper.tcl script, then it detect chan notice (from Chanpro1.4.tcl).

When I enabled failoper.tcl, the bot won't detect chan notice.

of course I kill my bot and start again after the change.
Locked