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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
[Lt]im
Voice
Posts: 17 Joined: Thu Mar 09, 2006 4:20 pm
Location: Kaunas - Lithuania
Post
by [Lt]im » Wed Aug 23, 2006 3:46 pm
I need a script, when a command .+m is used bot would lock chan (with mode +m) for 5mins, and after 5mins would automaticaly set mode -m.
[Lt]im
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Wed Aug 23, 2006 3:52 pm
Code: Select all
bind dcc - "+m" dcc:lockdown
proc dcc:lockdown {handle idx text} {
set chan [lindex [split $text] 0]
if {[validchan $chan] && [botisop $chan]} {
pushmode $chan +m
timer 5 [list pushmode $chan -m]
}
return 1
}
Hav'nt tested it, but should do the trick...
edit: Minor errors in the code, use consistent variable names, give $chan as an argument to validchan...
Last edited by
nml375 on Wed Aug 23, 2006 4:12 pm, edited 1 time in total.
NML_375
[Lt]im
Voice
Posts: 17 Joined: Thu Mar 09, 2006 4:20 pm
Location: Kaunas - Lithuania
Post
by [Lt]im » Wed Aug 23, 2006 4:06 pm
this should work in dcc chat? i want this to be public command.
[Lt]im
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Wed Aug 23, 2006 4:10 pm
Okies, something like this then..
Code: Select all
bind pub - ".+m" pub:lockdown
proc pub:lockdown {nick host handle chan text} {
if {[botisop $chan]} {
pushmode $chan +m
timer 5 [list pushmode $chan -m]
}
return 1
}
Edit: Be aware that this does not perform any checks on the person issuing the command, so anyone in the channel would be able to use this..
Probably wanna change the binding something like this:
into
Also altered name of proc (and binding) for clarity purposes only
NML_375