22.04.2000


chanctrl.tcl Component Documentation




# chanctrl.tcl for netbots.tcl v3.15
# designed to work with eggdrop 1.5.3 or higher
# Johoho's Eggdrop Page - http://johoho.tuts.net/eggdrop/
# chanctrl.tcl copyright (c) 1999,2000 by Johoho <johoho@hojo-net.de>
# netbots.tcl copyright (c) 1998-2000 by slennox <slennox@egghelp.org>

## chanctrl.tcl component script v2.10.0, 22.04.2000 ##

# History:
#
# v1.00.0, 01.02.2000 - initial release
# v1.50.0, 03.02.2000 - added quit msg check
# v1.51.0, 17.03.2000 - fixed wrong bans and quit msg check procedures
# v1.52.0, 19.03.2000 - added a comment on useradd
# v2.00.0, 01.04.2000 - complete rewrite of the code
# v2.10.0, 22.04.2000 - added action and part check (/me && [/leave || /part])

# thanks to dw and NML_375 for help. thanks slennox for netbots.tcl

Please note that this component is fully compatible with netbots.tcl v3.10 - 3.30 by slennox

Index




Description

This component was designed to monitor one or more channels for colour usage.
If it detects somebody using colours the person will get first a warning message from the bot. After a second misdoing person will get kicked and warned again. If the person still doesn't stop this misbehaviour it will get banned for two days. Should this still doesn't work, the bot will set a permban on the offender.
Some people use colours in der quit msg when parting irc so this script remembers who did so and sends the person a note on the next join. After a second warning it will proceed the same way as if somebody typed colours in channel; it will ban first for two days and then set a perm ban.


Installation

netset.tcl

To install this component properly you have to copy it to your netbots directory and add these lines to your netset.tcl conf:

# chanctrl.tcl
set nb_component(chanctrl) 1
set cc_chans ""
set cc_echans ""
set cc_flag "f"
set cc_note "$owner"
set cc_part 1
set cc_pubm 1
set cc_quit 1
set cc_shortban 2880
set cc_longban 0
set cc_txt_part1 "Please stop using colours in your part msg. thank you"
set cc_txt_part2 "You violate channel rules. Stop colour parting"
set cc_txt_part3 "Your continous colour part brought you a two day ban"
set cc_txt_part4 "Your perm banned for colour part. Talk to channel owner"
set cc_txt_pubm1 {
"Please stop using colours in our channel. We don't like this"
"For more information about our channel rules, visit http://johoho.tuts.net/eggdrop/"
"Thank you."
}
set cc_txt_pubm2 {
"This is second time you use colours in channel. Stop this now please."
}
set cc_txt_pubm3 {
"You can't comply to ruley, can you?"
"You're banned for 2 days now. Stop colour usage..."
}
set cc_txt_pubm4 {
"Well, it seems you really can't play be our rules."
"Your're perm banned!"
}
set cc_txt_quit1 "Please stop using colours in your quit msg. thank you"
set cc_txt_quit2 "You violate channel rules. Stop colour quit msg"
set cc_txt_quit3 "Your continous colour quit msg brought you a two day ban"
set cc_txt_quit4 "Your perm banned for colour quit msg. Talk to channel owner"

Settings Documentation

cc_chans (default: "")
List of channels in which to activate limiting.
Valid settings: one channel like "#donkeys", a list of channels like "#donkeys #cows #pigs", or "" to activate on all channels (except those listed in cc_echans).
 
cc_echans (default: "")
List of channels in which not to activate limiting.
Valid settings: Valid settings: one channel like "#donkeys", a list of channels like "#donkeys #cows #pigs", or "" to switch this off.
 
cc_flag (default: "f")
Users with this flag (global / channel) won't be punished or reminded for colour abuse.
Valid settings: every valid global or channel flag
 
cc_note (default: "$owner")
Enter here a list of people who should be notified if somebody gots banned for colour abuse.
Valid settings: one or more nicknames, seperated by a blank " ". Leave completely blank to disable.
 
cc_part (default: 1)
This setting enables the part check. Eggdrop will check every part msg in the channel(s) for colour.
Valid settings: 1 to enable, 0 to disable.
 
cc_pubm (default: 1)
This setting enables the channel check. Eggdrop will check every msg in the channel(s) for colour.
Valid settings: 1 to enable, 0 to disable.
 
cc_quit (default: 1)
This setting enables the channel check. Eggdrop will check every quit msg for colour.
Valid settings: 1 to enable, 0 to disable.
 
cc_shortban (default: 2880)
Set here the time in minutes how long a user should be punished if he ignores all warnings.
Valid settings: x minutes or 0 for a permban
 
cc_longban (default: 0)
Set here the time in minutes how long a user should be punished if he ignores even our short ban.
Valid settings: x minutes or 0 for a permban
 
cc_txt_part1
The sentence will be send as a note to the user on his first colour part msg. If the user is not registered within the bot, the script will automatically add him and set an aproperiate comment.
Valid settings: a string enclosed by "". Leave completely blank to disable.
 
cc_txt_part2
The sentence will be send as a note to the user on his second colour part msg.
Valid settings: a string enclosed by "". Leave completely blank to disable.
 
cc_txt_part3
The sentence will be send as a note to the user on his third colour part msg.
Valid settings: a string enclosed by "". Leave completely blank to disable.
 
cc_txt_part4
The sentence will be send as a note to the user on his fourth colour part msg.
Valid settings: a string enclosed by "". Leave completely blank to disable.
 
cc_txt_pubm1
The strings in this array will be send to the offender on his first colour usage via msg by the bot. Don't use too many of them since it can fill the bot's msg queue. If the user is not registered within the bot, the script will automatically add him and set an aproperiate comment.
Valid settings: an array of strings enclosed by "". Leave completely blank to disable.
 
cc_txt_pubm2
The strings in this array will be send to the offender on his second colour usage via msg by the bot. Don't use too many of them since it can fill the bot's msg queue.
Valid settings: an array of strings enclosed by "". Leave completely blank to disable.
 
cc_txt_pubm3
The strings in this array will be send to the offender on his third colour usage via msg by the bot. Don't use too many of them since it can fill the bot's msg queue.
Valid settings: an array of strings enclosed by "". Leave completely blank to disable.
 
cc_txt_pubm4
The strings in this array will be send to the offender on his fourth colour usage via msg by the bot. Don't use too many of them since it can fill the bot's msg queue.
Valid settings: an array of strings enclosed by "". Leave completely blank to disable.
 
cc_txt_quit1
The sentence will be send as a note to the user on his first colour quit msg. If the user is not registered within the bot, the script will automatically add him and set an aproperiate comment.
Valid settings: a string enclosed by "". Leave completely blank to disable.
 
cc_txt_quit2
The sentence will be send as a note to the user on his second colour quit msg.
Valid settings: a string enclosed by "". Leave completely blank to disable.
 
cc_txt_quit3
The sentence will be send as a note to the user on his third colour quit msg.
Valid settings: a string enclosed by "". Leave completely blank to disable.
 
cc_txt_quit4
The sentence will be send as a note to the user on his fourth colour quit msg.
Valid settings: a string enclosed by "". Leave completely blank to disable.



FAQ

Q:  I have a question, but it's not listed here.
A:  Feel free to contact the authot at johoho@hojo-net.de!



Contact

You can contact me via E-Mail at johoho@hojo-net.de, at ICQ 2499577 (tell me who you are and what you want or I'll ignore you) or catch me on irc usually around 18-24 UTC+1 in #eggdrop. (IrcNET)


DISCLAIMER

chanctrl.tcl is provided 'as is' and without warranty of any kind.



©2000 by Johoho@IrcNET, 22 April 2000. CONTACT