egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Bot Setting Wrong Modes [Help] {Solved}
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Branden
Halfop


Joined: 04 Aug 2007
Posts: 61

PostPosted: Sat Oct 04, 2008 2:55 pm    Post subject: Bot Setting Wrong Modes [Help] {Solved} Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Oct 04, 2008 3:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
Branden
Halfop


Joined: 04 Aug 2007
Posts: 61

PostPosted: Sat Oct 04, 2008 3:14 pm    Post subject: Reply with quote

I'm also getting the same problem with putquick.
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Oct 04, 2008 3:24 pm    Post subject: Reply with quote

May I ask which modes does not work, and their meaning?
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Branden
Halfop


Joined: 04 Aug 2007
Posts: 61

PostPosted: Sat Oct 04, 2008 3:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
Branden
Halfop


Joined: 04 Aug 2007
Posts: 61

PostPosted: Sat Oct 04, 2008 3:31 pm    Post subject: Reply with quote

By the way, my account has all modes, its the owner account, and its only getting channel modes +h
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Oct 04, 2008 3:59 pm    Post subject: Reply with quote

And the meaning of q and a?
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Branden
Halfop


Joined: 04 Aug 2007
Posts: 61

PostPosted: Sat Oct 04, 2008 4:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Oct 04, 2008 4:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
Branden
Halfop


Joined: 04 Aug 2007
Posts: 61

PostPosted: Sat Oct 04, 2008 5:04 pm    Post subject: Reply with quote

How do I do that?
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Oct 04, 2008 5:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
Branden
Halfop


Joined: 04 Aug 2007
Posts: 61

PostPosted: Sat Oct 04, 2008 10:06 pm    Post subject: Reply with quote

Need help again, please see initial post.
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sun Oct 05, 2008 11:02 am    Post subject: Reply with quote

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
View user's profile Send private message
Branden
Halfop


Joined: 04 Aug 2007
Posts: 61

PostPosted: Sun Oct 05, 2008 1:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sun Oct 05, 2008 2:26 pm    Post subject: Reply with quote

No other users with +n privileges?
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber