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 

Setting Eggdrop bot to give OP's after private messaging psw

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
fouro
Voice


Joined: 22 Dec 2007
Posts: 5

PostPosted: Thu Jul 31, 2008 5:45 am    Post subject: Setting Eggdrop bot to give OP's after private messaging psw Reply with quote

I've been trying to look for information about this, but at least so far I haven't found anything.

Is it possible to setup the bot so that it will give person OP's when he/she sends a private message to the bot containing the password? And that also would be the only requisite to get the OP's.

Also would it be possible to make it so that different channels have different passwords? This approach just seems to suite my situation best.
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Jul 31, 2008 10:51 am    Post subject: Reply with quote

Sure, create user accounts with proper hostmasks (so the bot will recognize them), and give them the +o flag. Next tell them to set a password (or set one for them yourself). Finally, tell them to "/msg botnick OP password" whenever they need op...
Since the password is user specific, you cannot have separate passwords for different channels. However, if you wish for one user to only be able to gain ops on certain channels, use channel-specific flags (such as .chattr handle |+o #thechannel)

Or were you referring to have a universal password for the channel, where anyone knowing the password would get op, regardless of wether your got recognizes them or not?
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
fouro
Voice


Joined: 22 Dec 2007
Posts: 5

PostPosted: Thu Jul 31, 2008 12:14 pm    Post subject: Reply with quote

Quote:
Or were you referring to have a universal password for the channel, where anyone knowing the password would get op, regardless of wether your got recognizes them or not?


Yep, this is what I meant. Sorry, didn't make myself clear.

We just have few channels and few people and most of us know each other, but still there are some variation who should get ops on what channel. And quite often someone seems to change computer, program, ISP or something and the hostmask changes. Or people are using some temporary connection somewhere.

I just would like to get a really simple way to distribute the ops without too much hassle playing with the hostmasks.
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Jul 31, 2008 2:17 pm    Post subject: Reply with quote

Well, script-wize, I'd guess you'd have to do something like this:
Code:
array set msgPasswd [list \
 "password" "#channel" \
 "password2" "#channel2" \
]
proc msgChanop {nick host hand text} {
 if {[info exists msgPasswd($text)]} {
  pushmode $::msgPasswd($text) +o $nick
 }
}
bind msg - "chanop" msgChanop

Code is untested, but should work out of the box. Just update the array of passwords and channels. If you have any problems or questions, don't hesitate to post here. If applicable, also include any error messages or such.

Usage would be: /msg botnick chanop password
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
fouro
Voice


Joined: 22 Dec 2007
Posts: 5

PostPosted: Mon Aug 04, 2008 1:27 pm    Post subject: Reply with quote

Great, I shall try that when I have time to tweak the bot. Thanks!
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 -> Eggdrop Help All times are GMT - 4 Hours
Page 1 of 1

 
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