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.
Old posts that have not been replied to for several years.
-
entrapmen
- Voice
- Posts: 27
- Joined: Tue Jul 08, 2003 9:08 am
- Location: TR
Post
by entrapmen »
i couldnt find a way to use bind notc
i got a script which has dat code:
bind notc - "*" kickle
proc kickle {nick uhost hand text} {
..
..
if {[regexp -nocase "#" $text] ....
wats wrong with dat? i ve read tcl-commands.doc dun send me there =)

but i didnt understand how to use bind notc

<@ll the world is about smiles and cries>
-
user
-
- Posts: 1452
- Joined: Tue Mar 18, 2003 9:58 pm
- Location: Norway
Post
by user »
entrapmen wrote:i ve read tcl-commands.doc
Did you read this part?
procname <nick> <user@host> <handle> <text> <dest>
Your proc can only handle 4 arguments, but the bind will call it with 5
Have you ever read "The Manual"?
-
entrapmen
- Voice
- Posts: 27
- Joined: Tue Jul 08, 2003 9:08 am
- Location: TR
Post
by entrapmen »
i m sorry i find the mistake
next time i ll read all
i just didnt read;
New Tcl procs should be declared as
proc notcproc {nick uhost hand text {dest ""}} {
global botnick; if {$dest == ""} {set dest $botnick}
...
}
tx anyway

have a nice day

<@ll the world is about smiles and cries>
-
caesar
- Mint Rubber
- Posts: 3778
- Joined: Sun Oct 14, 2001 8:00 pm
- Location: Mint Factory
Post
by caesar »
Better use something like:
Code: Select all
if {[lindex [split $dest "@"] 0] == $::botnick || [string index $dest 0]== "@"} {
return
}
This way it will "return" on notices sent to the eggdrop and in case of onotice (op notices).
Once the game is over, the king and the pawn go back in the same box.