| View previous topic :: View next topic |
| Author |
Message |
MasterScript Halfop
Joined: 26 Apr 2005 Posts: 41
|
Posted: Fri Oct 09, 2009 1:03 am Post subject: how adduser + access + level ? |
|
|
Hi,
Can anyone give me some guide to make like this:
bind MSG - adduser msg:adduser
bind MSG - access msg:access
ADDUSER
Step 1:
IRC command:
/msg botnick adduser #channel somenick access-level
Level:
"badmin" = Botnet Administrator
"cadmin" = Channel Administrator
"ccadmin" = Channel Co Administrator
"members" = Channel Members
Step 2: after adding
somenick will ask to set there password :
"Please set your password with /msg botnick pass <your password>"
Step 3:
after somenick set there password, bots notices:
"Successfully added you into my channel partition as Botnet Administrator"
"You may do so by typing /msg botnick pass <password> now to access"
CHECK ACCESS
IRC Command:
/msg botnick access #channel somenick
Bots will notices:
Nickname: somenick
Handle : somenick
Channel : #Channel
Level : Botnet Administrator
or
Nickname: somenick
Handle : somenick
Channel : #Channel
Level : Dont have any access
or simple notices : "somenick does not have access in #channel"
Thank you very much for your help |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Fri Oct 09, 2009 9:38 am Post subject: |
|
|
First off, you'd probably like to use a different command name for adduser, as this is already in use by eggdrop (you could, of course, rename eggdrop's command - though this could lead to confusions amongst admins later on).
Next step, separate each bit of info provided by the user. split and lindex (tcl manual) is your friend here. You'll also have to get the user@host of the nickname, see the getchanhost command for this (documented in doc/tcl-commands.doc).
Once we have all the info needed, use the adduser command (doc/tcl-commands.doc) to create the new handle.
Next, use the chattr command (doc/tcl-commands.doc) to assign the handle the appropriate flags depending on their "level".
Finally, use the puthelp command (doc/tcl-commands.doc) to send the user a PRIVMSG or NOTICE that (s)he needs to set his/her password.
The access-command is pretty much the same as above, other than instead of adding a new handle or changing flags, you use the matchattr command (doc/tcl-commands.doc) to test whether the handle has this or that flag for this or that channel. If the user is visible in the channel, you could probably also use the nick2hand command (doc/tcl-commands.doc) to get one channel member's handle as identified by your eggdrop. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
MasterScript Halfop
Joined: 26 Apr 2005 Posts: 41
|
Posted: Fri Oct 09, 2009 10:28 am Post subject: |
|
|
| Tq.. i will check it |
|
| Back to top |
|
 |
|
|
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
|
|