git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5458
e03df62e-2008-0410-955e-
edbf42e46eb7
class cmd_woot : public command_t
{
public:
class cmd_woot : public command_t
{
public:
+ /* Command 'woot', takes no parameters and needs no special modes */
cmd_woot (InspIRCd* Instance) : command_t(Instance,"WOOT", 0, 0)
{
this->source = "m_testcommand.so";
cmd_woot (InspIRCd* Instance) : command_t(Instance,"WOOT", 0, 0)
{
this->source = "m_testcommand.so";
{
/* We dont have to worry about deleting 'r', the core will
* do it for us as required.*/
{
/* We dont have to worry about deleting 'r', the core will
* do it for us as required.*/
try
{
MyV6Resolver* r = new MyV6Resolver("shake.stacken.kth.se", true);
try
{
MyV6Resolver* r = new MyV6Resolver("shake.stacken.kth.se", true);
- // Create a new command:
- // command will be called /WOOT, and will
- // call handle_woot when triggered, the
- // 0 in the modes parameter signifies that
- // anyone can issue the command, and the
- // command takes only one parameter.
+ // Create a new command
newcommand = new cmd_woot(ServerInstance);
ServerInstance->AddCommand(newcommand);
}
newcommand = new cmd_woot(ServerInstance);
ServerInstance->AddCommand(newcommand);
}
virtual void OnUserJoin(userrec* user, chanrec* channel)
{
virtual void OnUserJoin(userrec* user, chanrec* channel)
{
+ /* This is an example, we do nothing here */
}
virtual ~ModuleTestCommand()
{
}
virtual ~ModuleTestCommand()
{
virtual Version GetVersion()
{
return Version(1, 0, 0, 0, VF_VENDOR, API_VERSION);
virtual Version GetVersion()
{
return Version(1, 0, 0, 0, VF_VENDOR, API_VERSION);