detect flags admin

Help for those learning Tcl or writing their own scripts.
Post Reply
p
pilouuu
Halfop
Posts: 82
Joined: Mon Dec 26, 2005 8:03 pm

detect flags admin

Post by pilouuu »

# join admin

proc admin:service:join { nickname hostname handle channel } {
if {[lsearch -exact [userlist nm| $channel] $nickname]} {
putserv "PRIVMSG $channel :Admin detected $nickname"
pushmode $channel +v
}
For detected all master owner bot.


missing close-brace
while executing
"proc admin:service:join { nickname hostname handle channel } {
if {[lsearch -exact [userlist nm| $channel] $nickname]} {
put..."
thx for help :)
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Something so simple and you cannot even see it?

For very opened brace "{" there must be a closing one "}" to match.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
p
pilouuu
Halfop
Posts: 82
Joined: Mon Dec 26, 2005 8:03 pm

Post by pilouuu »

:D ohh sorry and thx

The bot no say welcome admin... no detected...

For please?
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Try something better, lsearch is worthless when you have matchattr

Code: Select all

if {[matchattr $handle mn]} {
p
pilouuu
Halfop
Posts: 82
Joined: Mon Dec 26, 2005 8:03 pm

Post by pilouuu »

first of all thank you for your assistance.

proc no only no detec and say msg.

thx :/
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

stef007 wrote:first of all thank you for your assistance.

proc no only no detec and say msg.

thx :/
Can you explain that a little better? It works now or not?
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
p
pilouuu
Halfop
Posts: 82
Joined: Mon Dec 26, 2005 8:03 pm

Post by pilouuu »

sorry :) Not :)
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

What's your code?
p
pilouuu
Halfop
Posts: 82
Joined: Mon Dec 26, 2005 8:03 pm

Post by pilouuu »

Code: Select all

# -- join admin

          proc admin:service:join { nickname hostname handle channel } {
            if {[lsearch -exact [matchattr [nick2hand $n] mn|]}
              putserv "PRIVMSG $chan :Admin detected $nickname"
              pushmode $chan +v 
                }
For detected On join all chan The Global Owner/master BoT and say msg


Thx all
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

So you said "not work" without even trying MeTroiD's suggestion?

Code: Select all

proc admin:service:join {nickname hostname handle channel} {
 if {[matchattr $handle mn]} {
  putserv "PRIVMSG $channel :Admin detected $nickname"
  pushmode $channel +v
 }
}
p
pilouuu
Halfop
Posts: 82
Joined: Mon Dec 26, 2005 8:03 pm

Post by pilouuu »

I have to test that did not go. soz
the bot one does not have any reaction when I join the chan :(
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

I bet you didn't even bind to join :lol: Try this:

Code: Select all

bind join mn * admin:service:join

proc admin:service:join {nick host hand chan} {
  putserv "PRIVMSG $chan :Admin detected $nick"
  pushmode $chan +v $nick
}
p
pilouuu
Halfop
Posts: 82
Joined: Mon Dec 26, 2005 8:03 pm

Post by pilouuu »

Yes!!! good good!!! big thx (k) .

It is possible to return this function only on that if the bot is oped in the chan.

thx for all

{kiss}
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

if {![botisop $chan]} {return 0}
figure out where to put it.
Post Reply