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.

TCL code not working

Old posts that have not been replied to for several years.
Locked
T
TurboChicken
Halfop
Posts: 61
Joined: Wed Sep 29, 2004 3:18 pm

TCL code not working

Post by TurboChicken »

y will this line not work???

Code: Select all

if {[matchattr $nick O|O #test]} {putserv "INVITE $nick #test" }
i'm not getting any errors

it's supposed to check whether the nick has a global O flag and then invite them to #test if they do??
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

you mean +o, not +O, right? +o is an op, +O is user-defined flag
T
TurboChicken
Halfop
Posts: 61
Joined: Wed Sep 29, 2004 3:18 pm

Post by TurboChicken »

no i mean +O definately... it's a flag i using to identify owners of something so they can be invited to an owners channel.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

then you probably need to convert $nick to $handle using [nick2hand], as required by [matchattr]
T
TurboChicken
Halfop
Posts: 61
Joined: Wed Sep 29, 2004 3:18 pm

Post by TurboChicken »

what's the syntax.... coz i tried changing the line to

Code: Select all

      if {[matchattr $nick O|O #stumpy-owners]} {puthelp "PRIVMSG $nick :this works" }
and that worked fine
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

this will work as long as $nick happen to have the same handle and the bot recognizes it (by hostmask) - which is not necessarily always the case

and since you are writing scripts, I'd assume you have at least seen tcl-commands.doc - refer to it for [nick2hand] syntax & purpose
T
TurboChicken
Halfop
Posts: 61
Joined: Wed Sep 29, 2004 3:18 pm

Post by TurboChicken »

perhaps i should rephrase this question then as i already know what you were saying about nick and handle having to be identical.

y will this not work

Code: Select all

putserv "INVITE $nick #test"
????
T
TurboChicken
Halfop
Posts: 61
Joined: Wed Sep 29, 2004 3:18 pm

Post by TurboChicken »

this is something that i have for another one and this one works fine. this one is transferred across a botnet and $a is the nick. and then there is a variable set to make the inviteChan thing work

Code: Select all

proc stumpMsgInvite {b k a} {putserv "INVITE $a $::inviteChan"}
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

set console +r and monitor server replies, might give you some hints
T
TurboChicken
Halfop
Posts: 61
Joined: Wed Sep 29, 2004 3:18 pm

Post by TurboChicken »

you soooooooooooooooooo rule man...

i had the channel name slightly wrong!!!!!!!!!!

DOH!!!!!
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

;)
Locked