This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

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

General support and discussion of Eggdrop bots.
Post Reply
f
fouro
Voice
Posts: 5
Joined: Sat Dec 22, 2007 4:34 pm

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

Post by fouro »

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.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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
f
fouro
Voice
Posts: 5
Joined: Sat Dec 22, 2007 4:34 pm

Post by fouro »

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.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Well, script-wize, I'd guess you'd have to do something like this:

Code: Select all

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
f
fouro
Voice
Posts: 5
Joined: Sat Dec 22, 2007 4:34 pm

Post by fouro »

Great, I shall try that when I have time to tweak the bot. Thanks!
Post Reply