IRCBot.text

From ShoutIRC RadioBot Wiki
Jump to: navigation, search

Contents

Overview

For some reason or another, documentation for ircbot.text has never been written. I am taking this opportunity to do that now.

ircbot.text contains 5 types of entries:

1. Comments
2. Includes
3. Messages
4. Custom Channel Commands
5. Command Aliases

Comments

Those lines beginning with #, /, or ;, as well as blank lines. The text loader ignores these lines completely and skips over them.

Example:
; This is a comment
# This is also a comment

Includes

The include line let you include another .text file for parsing. This is useful if you want to break up your .text file in to sections.

Example:
#include "ircbot2.text"

Messages

Messages are well, messages, used by the bot that you can customize to your own station, look, etc. Each message is defined in ircbot.text so you can look at them and edit them if you want.

Example:
RadioOn=Demo Radio is now ONLINE!

Channel-Specific Messages

The following messages you can set customized versions for certain channels: Song/DJNew/DJChange/RadioOn/RadioOff/TopicDjChange/TopicOffline/TopicOnline/OnJoin.
All you do is append _netno_#channel to the default name to specify a custom message.

Example:
Song_0_#testing=Custom Song Info Line for #testing: %song

Custom Commands

This allows you to create custom channel commands (aka triggers) users can use in your channel or via PM. Commands can be made to message something to a user, op someone, etc. You can also put a userflag/ in front of the command to restrict it to users with a certain user flag. You can define a command with the prefix !, ?, or @. ! triggers can be used in-channel only, ? can be used via PM only, and @ can be used in-channel or via PM.

Example Channel Commands:
!hi=NOTICE %nick :Hello %nick, I'm %me
!listeners=x/PRIVMSG %chan :Current listener count: %clients
Example PM Command:
?test=PRIVMSG %nick :Hello to you too
Example Channel/PM Command:
@test=PRIVMSG %nick :Hello to you too

Using Command Parameters

You can use $# in ircbot.text-based commands. It is just like mIRC scripting except $0 is the trigger instead of how many parameters were passed.
From the mIRC Help File: You can use the $1 $2 ... $N identifiers to refer to individual parameters in a line. You can also use $N- to refer to parameters N and onwards, and $N-M to refer to parameters $N through to $M. So to refer to a whole line, you would use $0-.

Command Aliases

This will let you create a command that will act like another command. For example, if you wanted a command like !next, but instead of !next you wanted !thissucks

Example:
!thissucks=!next

You can also specify default parameters to be used:

Example:
!kickdj=!autodj-stop now

This would make so if someone typed:

'!kickdj' the bot would see it as '!autodj-stop now'
'!kickdj blah' the bot would see it as '!autodj-stop blah'


RadioBot vde

RadioBot main pages
Main PageInstallationChangelogCommandsPluginsFAQConfigurationCreditsRemote ClientBuilt-In VariablesMulti Sound Server ModeUsername Character Restrictions
Auto DJ Pages
Auto DJ Main PageWebRequest SystemSchedulerMP3 EncoderVoice SupportMySQL Plugin
Personal tools