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.

if isop

Help for those learning Tcl or writing their own scripts.
Post Reply
n
neoclust
Halfop
Posts: 55
Joined: Fri Aug 14, 2009 11:03 am

if isop

Post by neoclust »

Hello I would like the script to return 0 if a specific nick is @ in channel knowing that frequently changes its last character in this form
"Eggnick?"
I tried this

Code: Select all

set eggyfriend "*Eggnick*"
if {[isop $eggyfriend $chan]} { return 0}
but it does not work when Eggynick put a nick Eggynick0 or 1 at the end, of the code does not return u have an idea plz thanks
d
doggo
Halfop
Posts: 97
Joined: Tue Jan 05, 2010 7:53 am
Contact:

Post by doggo »

Code: Select all

set eggyfriend [regexp -all -nocase -- {Eggnick*} data]
if {[isop $eggyfriend $chan]} { 
return 0
}
untested
n
neoclust
Halfop
Posts: 55
Joined: Fri Aug 14, 2009 11:03 am

Post by neoclust »

Thanks man i test
n
neoclust
Halfop
Posts: 55
Joined: Fri Aug 14, 2009 11:03 am

Post by neoclust »

The code does not react after
n
neoclust
Halfop
Posts: 55
Joined: Fri Aug 14, 2009 11:03 am

Post by neoclust »

it is possible to see "a handle as owner" if having @ access canal to avoid regexp?
n
neoclust
Halfop
Posts: 55
Joined: Fri Aug 14, 2009 11:03 am

Post by neoclust »

I had to use this command it looks to work well

Code: Select all

foreach bot [chanlist $chan b] {if {[isop $bot $chan]} {putlog "$bot true" ; return 0}}  
Post Reply