Noob making his first module needs help.

Back to Module Development

Page: 1  
From User Message Body
[Expletive Deleted]
Post #767
user avatar
Date: 5:25 pm, Jul 26 2008
Posts: 1

I'm making a module for doing various things I need to be done, and I'm having problems. What I want the bot to do is when I type "Sweet." I want it to send "Double sweet"

Here is my_mods.php:


class my_mods extends module {

    public $title = "Stuff";
    public $author = "[Expletive Deleted]";
    public $version = "0.1";

        public function dblsweet($line, $args){
        if($this->ircClass->hostMasksMatch($line['fromHost'], 'Delicious.Traps.Are.Delicious') OR $this->ircClass->hostMasksMatch($line['fromHost'], '')){
            $this->ircClass->privMsg($line['to'], 'Double sweet.');    
            $this->ircClass->privMsg($line['fromNick'], "You can't use this command because you're a jewcock.");


And here is my_mods.conf:

file my_mods modules/my_mods/my_mods.php

priv    Sweet    true    true    true    0    my_mods    dblsweet

EDIT: For some reason, it won't work if there isn't a non-alphanumerical character at the start of it. Is this programmed into the bot? Also, edited code. I've been practicing.

Last edited by [Expletive Deleted] at 6:58 pm, Jul 27 2008

User Posted Image

Back to Module Development