| View previous topic :: View next topic |
| Author |
Message |
blake Master
Joined: 23 Feb 2009 Posts: 201
|
Posted: Wed Dec 16, 2009 1:43 pm Post subject: Some help addop delop |
|
|
Hey found this bit of code by nml for addop has a small error
Tcl error [msg:addop]: missing "
Also how can i go about adding delop to this, addop needs to be global so basicaly will need to do adduser nick then chattr handle +flags
| Code: | bind msg SA addop cmd:addop
proc cmd:addop {nick host hand text} {
if {![validuser $hand]} {
set hand [string range $nick 0 8]
if {![validuser $hand]} {
adduser [string range $nick 0 8] [maskhost "${nick}!${host}]
} else {
puthelp "PRIVMSG $nick :Unable to register new handle"
return 1
}
}
chattr $hand "+ho"
}
|
_________________ Blake
UKEasyHosting UKStormWatch |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Wed Dec 16, 2009 1:56 pm Post subject: |
|
|
Minor typo in there.
| Code: | proc cmd:addop {nick host hand text} {
if {![validuser $hand]} {
set hand [string range $nick 0 8]
if {![validuser $hand]} {
adduser [string range $nick 0 8] [maskhost "${nick}!${host}"]
} else {
puthelp "PRIVMSG $nick :Unable to register new handle"
return 1
}
}
chattr $hand "+ho"
} |
For "delete op", reverse logic and use deluser to remove the user record, or chattr to remove the flags (deluser shown below):
| Code: | bind msg ho delop cmd:delop
proc cmd:delop {nick host hand text} {
if {[validuser $hand]} {
deluser $hand
}
} |
Chattr version:
| Code: | bind msg ho delop cmd:delop
proc cmd:delop {nick host hand text} {
if {[validuser $hand]} {
chattr $hand "-ho"
}
} |
_________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
blake Master
Joined: 23 Feb 2009 Posts: 201
|
Posted: Wed Dec 16, 2009 2:25 pm Post subject: |
|
|
addop dont seem to work when i do addop nickname _________________ Blake
UKEasyHosting UKStormWatch |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Wed Dec 16, 2009 2:27 pm Post subject: |
|
|
This script was written to add the user him/herself, not someone else. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
blake Master
Joined: 23 Feb 2009 Posts: 201
|
Posted: Wed Dec 16, 2009 2:30 pm Post subject: |
|
|
Ah i see i want it so +SA users can add delop _________________ Blake
UKEasyHosting UKStormWatch |
|
| Back to top |
|
 |
|