All pastes #993925 Raw Edit

#KefkasTower GBot Module Templat

public text v1 · immutable
#993925 ·published 2008-04-22 23:28 UTC
rendered paste body
/*****
	Template module for #KefkasTower Guardian bot
*****/

on *:load:{ add_command command_name_here }
on *:load:{ add_command MODINFO }

/***********************************************************
 *	Variables and other stuff:
 *		
 *		%mainchan - Main channel.
 *		${NULL} - Nothing.
 *		
 *	You can make your own variables within the module source.
 *	It is recommended to use the format %m_yourmodulename.variablename
 *
/***********************************************************

on *:text:*:?:{
	if (($1 == MODINFO) && ($2 == ${NULL})) {
		send Module: YOUR_MODULE_NAME (Desc) {MODINFO YOUR_MODULE_NAME for more info}
	}
	elseif (($1 == MODINFO) && ($2 == YOUR_MODULE_NAME)) {
		send Description of your module
		send Modver0.0 Author: You Other info: Whatever
	}
	elseif (($1 == HELP) && ($2 == COMMANDS)) {
		send YOUR_COMMAND: (Module function)
		;Only use this if you want a help function included.
		;If not, use a blank here.
	}
	elseif (($1 == HELP) && ($2 == YOUR_COMMAND)) {
		send Help on my command.
		send Line 2 on help.
		;Only include this if you want a help function included.
		;If not, use:
		;send No help for $2 $+ . See /MSG $me HELP for more info.
	}

;Include what your module does here if it requires you to PRIVMSG the bot.
;If it doesn't, include whatever conditions need to be met in another ON: event, below.
;In this example, we'll include both.

elseif ($1 == TESTCOMMAND) {
	send Your test worked. Yay!
	halt
;If your module is not a command, use this:
;   send  $+ $1 $+ : Unknown command. See /MSG $me HELP for more info.
;   halt
}



}

;The non-command example follows.

on *:join:%mainchan:{
	send HI, I'M BEING ANNOYING!
	send This message brought to you by m_testcommand.mrc
	halt
}