| View previous topic :: View next topic |
| Author |
Message |
Hamish Voice
Joined: 27 Mar 2006 Posts: 25
|
Posted: Fri May 05, 2006 4:30 pm Post subject: Help with a channel protection script. |
|
|
Ok, I've got an autoop channel (everyone is autoop on join)...
Of course I don't want everyone banning each other and changing the topic all the time so I tried to write a script to stop that.
Here what I got so far:
| Code: | set Hamish "Hamish"
bind topc - "#hamish *" resetopc:topc
proc resetopc:topc { nick uhost handle channel topic } {
global Hamish botnick
if { $nick == $Hamish } { }
if { $nick == $botnick } { }
else { puthelp "TOPIC #hamish :(original topic)"
putlog "Reset topic changed by %nick"
puthelp "PRIVMSG %NICK :Please don't try to change the topic on this channel..." }
}
bind mode - * mode_proc_fix
proc mode_proc_fix {nick uhost hand chan mc {victim ""}} {
if {$victim != ""} {append mc " $victim"}
mode_proc $nick $uhost $hand $chan $mc
} |
I've probably done it totally wrong... It is ment to reset the topic if someone other than me changes it... And remove all bans other than ones set by me.
If anyone can help I'd appreciate it, thanks! _________________ Thanks, Hamish. |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Fri May 05, 2006 6:59 pm Post subject: |
|
|
| Code: | bind join - "#hamish *" gettopic
bind topc - "#hamish *" resettopic
proc gettopic {nick uhost hand chan} {
if {[isbotnick $nick]} {
set ::currenttopic [topic $chan]
}
}
proc resettopic {nick uhost hand chan topc} {
global currenttopic
if {[isbotnick $nick] || [string equal -nocase Hamish $nick]} {
set currenttopic $topc
} {
putserv "topic $chan :$currenttopic"
putlog "Reset topic changed by $nick"
puthelp "privmsg $nick :Please don't try to change the topic on this channel..."
}
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Hamish Voice
Joined: 27 Mar 2006 Posts: 25
|
Posted: Sat May 06, 2006 3:48 am Post subject: |
|
|
Ah yeah! Works perfectly thanks!
Now I'm gonna try a ban reset-er lol. _________________ Thanks, Hamish. |
|
| Back to top |
|
 |
|