| View previous topic :: View next topic |
| Author |
Message |
Branden Halfop
Joined: 04 Aug 2007 Posts: 61
|
Posted: Sat Oct 04, 2008 2:55 pm Post subject: Bot Setting Wrong Modes [Help] {Solved} |
|
|
Okay.. So it worked at first, till I had someone with chattr modes of h, and they were getting +qaohv... When they should have only gotten +hv...
| Code: |
proc Up { nick host hand chan text } {
if {[matchattr $hand n|n $chan]} {
putserv "MODE $chan +qaohv $nick $nick $nick $nick $nick"
} elseif {[matchattr $hand m|m $chan]} {
putserv "MODE $chan +aohv $nick $nick $nick $nick"
} elseif {[matchattr $hand o|o $chan]} {
putserv "MODE $chan +ohv $nick $nick $nick"
} elseif {[matchattr $hand h|h $chan]} {
putserv "MODE $chan +hv $nick $nick"
}
}
|
I don't know if this is why, but, each user don't have it's own handle. Each user that has access to the !up command is in a group which has a handle.
Example;
the handle Helpers has the host of *!*@Helper.CyberByteCafe.Co.CC, I want this group to be able to use !Up and only get +h
My problem is the bot is giving all modes (+qaohv)
Last edited by Branden on Sun Oct 05, 2008 3:31 pm; edited 3 times in total |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Oct 04, 2008 3:08 pm Post subject: |
|
|
Unfortunately, the pushmode command does not understand some "non-standard" modes, and thus cannot handle/stack them properly. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Branden Halfop
Joined: 04 Aug 2007 Posts: 61
|
Posted: Sat Oct 04, 2008 3:14 pm Post subject: |
|
|
| I'm also getting the same problem with putquick. |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Oct 04, 2008 3:24 pm Post subject: |
|
|
May I ask which modes does not work, and their meaning? _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Branden Halfop
Joined: 04 Aug 2007 Posts: 61
|
Posted: Sat Oct 04, 2008 3:30 pm Post subject: |
|
|
n|n get chan modes +qaohv
m|m get chan modes +aohv
o|o get chan modes +ohv
h|h get modes +hv |
|
| Back to top |
|
 |
Branden Halfop
Joined: 04 Aug 2007 Posts: 61
|
Posted: Sat Oct 04, 2008 3:31 pm Post subject: |
|
|
| By the way, my account has all modes, its the owner account, and its only getting channel modes +h |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Oct 04, 2008 3:59 pm Post subject: |
|
|
And the meaning of q and a? _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Branden Halfop
Joined: 04 Aug 2007 Posts: 61
|
Posted: Sat Oct 04, 2008 4:03 pm Post subject: |
|
|
UnrealIRCd's Channel Owner (q)
and Protected Op (a)
The bot will set the modes in other commands, just not this one. |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Oct 04, 2008 4:27 pm Post subject: |
|
|
Oh wait... you're using the same trigger with pub-bindings... that's the main problem...
PUB bindings does not stack, so any newer binding will override any previous one, thus making the only binding the halfop binding...
My suggestion, skip the flags in the binding, and do the proper privileges-check within the proc itself instead... _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Branden Halfop
Joined: 04 Aug 2007 Posts: 61
|
Posted: Sat Oct 04, 2008 5:04 pm Post subject: |
|
|
| How do I do that? |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Oct 04, 2008 5:46 pm Post subject: |
|
|
I'd use "matchattr":
| Code: | bind pub - !up up
...
if {[matchattr $handle n|n $channel]} {
putserv "MODE $channel +q $nick"
} elseif {[matchattr $handle m|m $channel]} {
...
|
_________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Branden Halfop
Joined: 04 Aug 2007 Posts: 61
|
Posted: Sat Oct 04, 2008 10:06 pm Post subject: |
|
|
| Need help again, please see initial post. |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sun Oct 05, 2008 11:02 am Post subject: |
|
|
Would need examples of those different users, including added hostmasks...
Most likely, you've got one user (handle) with full privileges that has a very broad hostmask, also matching those having nick!user@Helper.CyberByteCafe.Co.CC. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Branden Halfop
Joined: 04 Aug 2007 Posts: 61
|
Posted: Sun Oct 05, 2008 1:37 pm Post subject: |
|
|
| Code: |
Handle: Root;
Hosts: *!*@NetAdmin.CyberByteCafe.Co.CC;
Modes: jlmnoptx;
|
| Code: |
Handle: Admins;
Hosts: *!*@Admin.CyberByteCafe.Co.CC; *!*@CoAdmin.CyberByteCafe.Co.CC; *!*@ServicesAdmin.CyberByteCafe.Co.CC;
Modes: jlmoptx;
|
| Code: |
Handle: Opers;
Hosts: *!*@GlobalOper.CyberByteCafe.Co.CC; *!*@LocalOper.CyberByteCafe.Co.CC;
Modes: ajloptx;
|
I want the handle Root to get channel modes: +qaohv
I want the handle Admins to get channel modes +aohv
I want the handle Opers to get channel modes +ohv
[/quote] |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sun Oct 05, 2008 2:26 pm Post subject: |
|
|
No other users with +n privileges? _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
|