collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Few suggestions  (Read 7654 times)

0 Members and 1 Guest are viewing this topic.

Offline Hotshot

  • BeBot User
  • **
  • Posts: 21
  • Karma: +0/-0
Few suggestions
« on: September 05, 2006, 01:37:07 pm »
Here is 2 of things i'd like to see put onto the bot.

!members (give list of members)
afk or brb (bot recognises these words and post little script "name" is afk)

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Few suggestions
« Reply #1 on: September 05, 2006, 05:24:35 pm »
Both implemented already.

search for !memberlist (by Wolfbiter) and !afk (by Craized).  suggest to download v1.1 of !afk which is superior to the one distributed with Bebot (last time I looked).  This will add an "AFK" next to the !online list.

Cheers,

-jj-

Offline Wolfbiter

  • Contributor
  • *******
  • Posts: 149
  • Karma: +0/-0
    • KAZE
Re: Few suggestions
« Reply #2 on: September 06, 2006, 09:35:54 am »
I can't promise my script will work with latest bebot, was a while since I wrote it and have no idea what possible database changes may have happend since.
Too many toons.

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Few suggestions
« Reply #3 on: September 06, 2006, 01:07:42 pm »
I'll convert that one myself once I update to Bebot 0.3, it's bloody useful :-)

-jj-

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Few suggestions
« Reply #4 on: September 06, 2006, 02:13:51 pm »
Members list is planned for 0.3/0.5

Im not entirely happy with the AFK module for BeBot, and i actually find myself missing the AFK functionality from IGN. I don't know when i will find time to do something about it though.
BeBot Founder and Fixer Kingpin

Offline Malosar

  • BeBot Expert
  • ****
  • Posts: 259
  • Karma: +0/-0
    • http://www.lowerdimension.com
Re: Few suggestions
« Reply #5 on: September 06, 2006, 02:18:48 pm »
Members list is planned for 0.3/0.5

Im not entirely happy with the AFK module for BeBot, and i actually find myself missing the AFK functionality from IGN. I don't know when i will find time to do something about it though.

From what I remember, mentioning someones name in chat that was afk spawned an afk message from the bot, which is what I miss. Is that what you mean? Not sure what else it did.
Eternalist
General of The Syndicate

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Few suggestions
« Reply #6 on: September 06, 2006, 02:20:31 pm »
Yes, it's one of the things i miss.
Another thing was also that you didn't need to use a command prefix for the afk commands to be picked up.
BeBot Founder and Fixer Kingpin

Offline Malosar

  • BeBot Expert
  • ****
  • Posts: 259
  • Karma: +0/-0
    • http://www.lowerdimension.com
Re: Few suggestions
« Reply #7 on: September 06, 2006, 02:33:12 pm »
The AFK module I run doesn't require a command prefix, it will do it with or without.

Code: [Select]
        function gmsg($name, $group, $msg) {
                if($name != ucfirst($this -> bot -> botname)) {
                        if(preg_match('/^'.$this -> bot -> commpre.'afk show$/i', $msg)) $c = $this -> list_afk();
                        elseif(preg_match('/^afk ?(.*)/i', $msg, $afkmsg)) $c = $this -> gone($name, $afkmsg[1]);
                        elseif(isset($this -> afk[$name])) $c = $this -> back($name);
                        $c != '' ? $this -> bot -> send_gc($c) : NULL;
                }
        }
Eternalist
General of The Syndicate

Offline Malosar

  • BeBot Expert
  • ****
  • Posts: 259
  • Karma: +0/-0
    • http://www.lowerdimension.com
Re: Few suggestions
« Reply #8 on: September 07, 2006, 02:32:13 pm »
The section I posted was just the gmsg section of the AFK module showing it listening for afk without a "!".

Here is the entire module:

Code: [Select]
<?php
/*
* AFK Module for BE Bot <http://bebot.fieses.net>
* Module coded by Craized <http://www.craized.net>
* v1.01
* Special thanks to Lal for bug fixes, styles, and development

/*
Add a '_' at the beginning of the file (_AFK.php) if you do not want it to be loaded.
*/

$afk = new AFK($bot);

$commands['tell']['afk'] = &$afk;
$commands['privgroup'][] = &$afk;
$commands['gmsg'][$guild_name][] = &$afk;
$commands["buddy"][] = &$afk;

Class 
AFK {
        var 
$bot;
        var 
$afk;

        function 
AFK(&$bot) {
                
$this -> bot = &$bot;
                
$this -> afk = array();
                
$this -> bot -> db -> query('INSERT IGNORE INTO settings (setting, value) VALUES ("highlight_1", "CB11C9")');
                
$this -> highlight_1 = !method_exists($this -> botget_setting) ? '<font color=#CB11C9>' '<font color=#'.$this -> bot -> get_setting('highlight_1').'>';
        }

function 
buddy($name$msg)     {
  if(
$msg != 1)
    if(
$this -> afk[$name]) unset($this -> afk[$name]);
}
        
        function 
tell($name$msg) {
                if(
preg_match('/^'.$this -> bot -> commpre.'afk ?(.*)/i'$msg$afkmsg)) $c $this -> gone($name$afkmsg[1]);
                if(
preg_match('/^'.$this -> bot -> commpre.'afk show$/i'$msg)) $c $this -> list_afk();
                
$c != '' $this -> bot -> send_gc($c) : NULL;
        }

        function 
privgroup($name$msg) {
                if(
$name != ucfirst($this -> bot -> botname)) {
                        if(
preg_match('/^'.$this -> bot -> commpre.'afk show$/i'$msg)) $c $this -> list_afk();
                        elseif(
preg_match('/^afk ?(.*)/i'$msg$afkmsg)) $c $this -> gone($name$afkmsg[1]);
                        elseif(isset(
$this -> afk[$name])) $c $this -> back($name);
                        
$c != '' $this -> bot -> send_pgroup($c) : NULL;
                }
        }

        function 
gmsg($name$group$msg) {
                if(
$name != ucfirst($this -> bot -> botname)) {
                        if(
preg_match('/^'.$this -> bot -> commpre.'afk show$/i'$msg)) $c $this -> list_afk();
                        elseif(
preg_match('/^afk ?(.*)/i'$msg$afkmsg)) $c $this -> gone($name$afkmsg[1]);
                        elseif(isset(
$this -> afk[$name])) $c $this -> back($name);
                        
$c != '' $this -> bot -> send_gc($c) : NULL;
                }
        }

        function 
gone($name$msg) {
                
$this -> afk[$name] = empty($msg) ? 'Away from keyboard' $msg;
                
$c $this -> highlight_1.$name.'</font> is now AFK.';
                return 
$c;
        }

        function 
back($name) {
                if(isset(
$this -> afk[$name])) {
                        unset(
$this -> afk[$name]);
                        
$c $this -> highlight_1.$name.'</font> has returned from away.';
                }
                return 
$c;
        }

        function 
list_afk() {
                
$blob '::::: '.$this -> bot -> guildname.(preg_match("#s$#i"$this -> bot -> guildname) ? '\'' '\'s').' AFK List :::::';
                
$blob .= "\n\n\n";
                foreach(
$this -> afk as $key=>$value) {
                        
$blob .= $this -> highlight_1.$key.'</font> is AFK ('.$value.')';
                        
$blob .= "\n\n";
                }
                
$c $this -> bot -> make_blob('User\'s AFK'$blob);
                return 
$c;
        }
}
?>

Eternalist
General of The Syndicate

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 158
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal