cpitchfor12.3 2003/01/06 http://iroffer.itmakesmemad.com/ This patch adds a bunch of new features to iroffer. All have been requested by faithful people on a channel I frequent. See here for a summary: CRASHLOG handler: ----------------- When the bot crashes, it dumps debug information to the screen. Now it will also dump it to a file which you can email, along with your config file, to support@iroffer.itmakesmemad.com. The parameter MUST be added to your config file. The bot will not start with out this option set: crashlog oops-i-crashed.txt XDCC LIST handler: ------------------ This is an update to the admin command "NOLIST" and the config file directive nolist. The admin command "NOLIST" can be sent to the bot to control how it will react to a xdcc list request: NOLIST [ [-q|n] ] NOLIST with no paramters will turn listing back on. The first parameter can be "on" or a number. "on": Turn listing off until it is enabled again with the NOLIST command n: Turn listing off for n minutes 0: Turn listing back on The second optional parameter can be -q or a number -q: When a xdcc list request is received quietly drop the request. Do not inform the requesting user that lists have been disabled m: Ban any user that xdcc list requests this bot for m minutes if no second paramter is provided, the bot will msg the requesting user to tell them the bot is not accepting list requests. NOLIST 10 # Will turn off list response for 10 minutes NOLIST 10 -q # will turn off list responce for 10 minutes and drop list requests silently. The user will not get any response from the server at all. -q quiet NOLIST 10 100 # Will turn off list response for 10 minutes and auto ban any user who sends a list request for 100 minutes NOLIST on 1000 # Will turn off listing and ban any requesting user for 1000 minutes The nolist directive has also been added to the configuration file nolist # turns off listing nolist -q # turns off listing and quietly drop list requests does NOT inform the user that lists have been disabled nolist 1000 # turns off listing and bans any user making a list # request for 1000 minutes. Bad Pack auto ban ----------------- Now you can ban a user if they request a pack that isn't offered on your bot To make it slightly fairer, you can change the limits so that they are only banned if they make these requests repeatidly, use the admin commands BADPACK and BDPKLMT to change these values as follows: BADPACK on 10 # Turn on the BADPACK autoban and ban a user for 10 minutes BADPACK 0 # Turn off BADPACK autobaning BADPACK 30 5 # For the next 30 minutes, turn on BADPACK autobanning and ban users for 5 minutes BDPKLMT 5 10 # When autobaning is enabled (see above) ban a user if they request 5 invalid packs in 10 minutes BDPKLMT 2 60 # When autobannign is enabled ban a user if they request 2 invalid packs in 60 minutes (harsh!) Humiliate the user autobanned ---------------------------- You can set either as an admin command or in the config file a message to be sent to the channels the bot sits on in the event it should auto-ban a user You can specify nolist or badpack to specify when the message should be used humiliate nolist I've just banned %u for %t for being naughty should cpitchfor send a xdcc list when nolist+ban is on the channel would see: I've just banned cpitchfor for 10 minutes for being naughty humiliate badpack I've just banned %u for %t for requesting %p in %m would mean that should cpitchfor repeatidly request invalid packs : I've just banned cpitchfor for 60 minutes for requesting 2 invalid packs in 60 minutes %u is replaced with the username (nick) %t is replaced with the ban time for badpack also: %p is replaced with the number of invalid packs requested %m is replaced with the time in which these packs were requested Custom Ads: ----------- This is an additional flag to the channel directive in the configuration file: channel #mychannel -plist 30 -pformat summary -advert This instructs the bot that when sending an advert to the channel it should send a "custom" advert defined in the directive advert: advert This is the first line of the advert advert This is the second line of the advert advert 3rd line: SLOTS:[%a/%b] QUEUE:[%c/%d] advert 4th line: Record Speed: %g Total Offered: %x a % is a special character, much like in printf. It will be replaced with values as the advert is sent for example the above example would send This is the first line of the advert This is the second line of the advert 3rd line: SLOTS:[4/10] QUEUE:[0/0] 4th line: Record Speed: 1245.3K/s Total Offered: 3223.3 MB If a channel has a "-advert" flag but there are no "advert" lines defined in the config file, the bot will not advertise in that channel The conversions are as follows: %a number of slots in use %b total slots %c number in main queue %d size of main queue %e number in pack queue %f size of pack queue %g pack speed record (K/sec) %h number of lines in send to server queue %i amount of data sent to network in past 120 seconds (K) %j average bandwidth of past 120 seconds (K/sec) %k record average bandwidth (K/sec) %l minimum bandwith required %n bots nick %w number of packs offered %x total size of offered packs (MB) %y total completed transfers %z total transfered (MB) %% a single "%" Advert Control: --------------- You can now disable adverts either permanently or for a number of minutes. Use the admin command "ADVERTS" to control the auto-adverts: ADVERTS 0 Enable auto advert posting to channels ADVERTS off Disable adverts permanently ADVERTS 20 Disable adverts for at least the next 20 minutes You can also disable adverts (to be reenabled as above) from the config file. Use "noadverts" to disable them. Advertise NOW! -------------- A new admin command has been added to force an advert to be sent to a single or all of the channels the bot is on ADSEND #mychannel will force an advert to be sent to #mychannel ADSEND will force an advert to be sent to ALl the channels the bot is on Change Adverts: --------------- Although adverts can be changed in the config file, there is an admin command to change your bot's advert on the fly: "ADVERT" ADVERT HELP Display help usage for the advert commands ADVERT CURRENT Displays the current advert template ADVERT COPY Copies the current advert template into the new advert template ADVERT CLEAR Clears the new advert template ADVERT VIEW Views the new advert template ADVERT TEST Tests the new advert template (shows you what would be sent to the channel ADVERT APPLY Moves the new advert template to the current advert template ADVERT TAGS Shows a list of special % tags and what they are replaced with ADVERT ADD Adds and removes lines from the new advert template Advert Add 2 Insert this as line two Advert Add - Append this to the end Advert Add 4 Remove line 4 Advert Add - Remove last line "-" will always refer to the last line of the advert Public Triggers: ---------------- iroffer will respond to public triggers such as "xdcc list" or /ctcp #channel ping. The admin command "public" can control this functionality public - will turn off the ability to respond to any public trigger public + will turn it back on again you can set the default in you config file with either public # react to public triggers nopublic # dont react to public triggers Change Bot's Nick: ------------------ You can change the bot's nick on the fly using the admin nick command. nick newnick will change the bot's nick to newnick Limit total data transfer: (Midknite) -------------------------- Now you can limit the ammount of data the bot will transfer within a period of time. This is useful if you have an upload limit! From the admin interface you can LIMITDATA 45M 3 Limit the bot to sending 45Megs in 3 days LIMITDATA 6G 7 Limit the bot to sending 6Gigs in 7 days LIMITDATA 0 Disable the transfer limit In addition to the admin command, you can use the limitdata config file parameter with the same parameters You can specify which file your bot will store limit data in with the limitdatafile parameter in the config file. limitdatafile /path/to/my/file/foo.bar Instant send of files by size: (Gorthog) ------------------------------ You can instruct your bot send small files immediately using the instasend command and instasend config file parameter. Files will be send irregardless of queue and send status if their size is less than the limit instasend 1024 send all files 1024 bytes or less immediately instasend 0 disable instant sending of files Baning Network ranges: ---------------------- ignore 10 cptf-adsl.demon.co.uk will ignore all connections from cptf-adsl.demon.co.uk ignore 10 *.demon.co.uk will ignore all connections from ANY host ending in .demon.co.uk Bandwidth Warning Notices ------------------------- When a user is downloading a pack with bandwidth limits (or from a bot with bandwidth limits) iroffer will send the user a warning regarding bandwidth limits and how much bandwidth they are using. This can now be controlled with these functions: SPDWRN Admin command SPDWRN + Enable bandwidth warning notices SPDWRN - Disable bandwidth warning notices Configuration file directives: speedwarnings Enable bandwidth warning notices nospeedwarnings Disable bandwidth warning notices Queue position updates ---------------------- When a user is queued for a pack, the bot will, by default, send the user an update of their queue position every three minutes. You can now change this value from the config file and on the fly: In the config file: queueupdate on # Will send a user an update every 3 minutes queueupdate 10 # Will send a user an update every 10 minutes queueupdate off # Will prevent queue updates being sent From the console use: QUPDATE on QUPDATE 10 QUPDATE off Queue Auto-ignoring: -------------------- When the queue is full and a user makes a send request, the bot will inform them that the queue is full and that they should try again later. Now you can auto-ignore these people (ideally for a SHORT time, lets not be mean here!). The admin command "fullignore" controls this: FULLIGNORE 1 Will automatically ignore any user for one minute should they make a request when the queue is full. It will NOT send them any queue-full notification. FULLIGNORE Reenabled notifications. No users will be ignored, they will instead receive a queue-full warning You can control this in the configuration file with "fullignore" fullignore 10 # auto-ignore for 10 minutes on queue full request Speak To People And Channels: ----------------------------- Now you can say things to people and to the channel with the admin command say and emote. For example: say #yourchan Hello everybody send a message to #yourchan say bob Hello bob send a private message to bob emote #yourchannel is a super bot! describes " is a superbot" in #yourchannel emote bob wishes bob a good day describes " wishes bob a good day" to bob Pre join RAW commands: ---------------------- Some services on networks (ie DALNet) require raw commands to be sent to the server before joining a channel (ie to register a nick with a password) The prejoin config file parameter allows you to specify multiple raw commands that will be sent prior to the bot joining a channel. It will also be sent in the event a bot changes server or is disconnected and reconnects. This can also be used to msg a nick when the bot comes up.. ie prejoin PRIVMSG cpitchfor : I've just joined a server and I'm serving! prejoin nickserv mybot mypassword