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.

just a quickie

Old posts that have not been replied to for several years.
Locked
User avatar
entrapmen
Voice
Posts: 27
Joined: Tue Jul 08, 2003 9:08 am
Location: TR

just a quickie

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 =)
:D :D but i didnt understand how to use bind notc :oops: :oops: :oops: :( :(
<@ll the world is about smiles and cries>
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: just a quickie

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"?
User avatar
entrapmen
Voice
Posts: 27
Joined: Tue Jul 08, 2003 9:08 am
Location: TR

Post by entrapmen »

i m sorry i find the mistake :oops: :oops: :oops:

next time i ll read all :D :D :D

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 :D have a nice day :wink:
<@ll the world is about smiles and cries>
User avatar
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.
Locked