[MOD] Invite-Responder

Back to Module Support

Page: 2  
From User Message Body
Jossie90
Post #687
Member
Date: 3:15 pm, Mar 2 2008
Posts: 9


Instead of

Code

    public function chan_invite($line)
    {
        $this->ircClass->joinChannel($line['text']);
        $this->ircClass->removeMaintain($line['text']);
        $this->ircClass->maintainChannel($line['text']);
    }


This would be better:

Code

    public function chan_invite($line)
    {
    If ($this->ircClass->getServerConf('MAXCHANNELS')=<count($this->ircClass->getMaintainedChannels))
        {
        //notice the user the bot has the max amount of channels
        } else if (in_array($line['text'],$this->ircClass->getMaintainedChannels()))
{
//Notice the user the bot is already in the channel
        } else {
        $this->ircClass->joinChannel($line['text']);
        $this->ircClass->maintainChannel($line['text']);
}
    }

Haven't tested it though it should work.
Gettint the tabs in here doesn't work so it looks messed up :p


Some IRCd's seem to use different names for the limit so you might have to change it or just use a static limit.

#/dev/null at irc.kwaaknet.org
   

Previous Page Pages (2) [ 1 2 ]  

Back to Module Support