| View previous topic :: View next topic |
| Author |
Message |
MrDeNNiS Voice
Joined: 07 Jan 2012 Posts: 3
|
Posted: Mon Feb 06, 2012 10:05 am Post subject: Check User is protect and is owner (+a & +q) |
|
|
Hello,
I have simple code like this.
| Code: | bind pub - !op op:proc
proc op:proc {nick uhost hand chan arg} {
if {[isop $nick $chan]} {
#my code goes here, it works problem is not here.
}
} |
The problem is that if the user have a "op" (+o) , works great. But if the user have a "protect" (+a) or "owner" (+q) code doesn't work.
Please help me, how can I make this code working for "protected users and channel owners." ? |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Mon Feb 06, 2012 10:42 am Post subject: |
|
|
One thing that comes to mind, to check:
In eggdrop.conf, find:
set opchars
What is it now? Is it:
set opchars "@"
If I recall correctly, that is the default.
If so, change it to include & and ~
and .restart
reference:
http://eggwiki.org/Eggdrop.conf |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Mon Feb 06, 2012 7:08 pm Post subject: Re: Check User is protect and is owner (+a & +q) |
|
|
| MrDeNNiS wrote: | The problem is that if the user have a "op" (+o) , works great. But if the user have a "protect" (+a) or "owner" (+q) code doesn't work.
Please help me, how can I make this code working for "protected users and channel owners." ? |
Thommey wrote something for this already...
| Quote: | Arbitrary chanmodes (+q, +a)
This script provides accessor functions isowner and isadmin to get ownership/adminship (or w/e those are) to tcl scripts.
You need to restart the bot when you first load it. |
See here --> http://thommey.tclhelp.net/?page=scripts
Download here --> http://thommey.tclhelp.net/dl/dl.htcl?id=6 _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
FightingNavyman Voice
Joined: 18 Jan 2011 Posts: 35
|
Posted: Fri Mar 02, 2012 4:20 pm Post subject: |
|
|
| how do yo use it? |
|
| Back to top |
|
 |
Regex Voice
Joined: 19 Mar 2011 Posts: 19
|
Posted: Sat Mar 03, 2012 2:44 pm Post subject: |
|
|
| Code: |
bind mode - * mode:msg
proc mode:msg {nick uhost hand chan mode desc} {
global botnick
if {$mode == "+o"} {
if {$desc == $botnick} { return 0 }
putquick "PRIVMSG $chan $desc $desc is now an operator!"
}
if {$mode == "+h"} {
if {$desc == $botnick} { return 0 }
putquick "PRIVMSG $chan $desc $desc is now halfoperator!"
}
if {$mode == "+v"} {
if {$desc == $botnick} { return 0 }
putquick "PRIVMSG $chan $desc $desc is now voice!"
}
if {$mode == "+a"} {
if {$desc == $botnick} { return 0 }
putquick "PRIVMSG $chan $desc $desc is now super operator!"
}
if {$mode == "+q"} {
if {$desc == $botnick} { return 0 }
putquick "PRIVMSG $chan $desc $desc is now founder!"
}
}
|
I added +q and +a modes but bot giving 2 message to channel. how can we prevent this? |
|
| Back to top |
|
 |
|