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: Bannfunction on a public raidbot  (Read 5693 times)

0 Members and 1 Guest are viewing this topic.

Offline Solerna

  • BeBot User
  • **
  • Posts: 21
  • Karma: +0/-0
Bannfunction on a public raidbot
« on: November 11, 2005, 03:40:30 am »
Had the plan to run a public raidbot and has found most funcitons I wanted  availible. However there is a little thing that I have yet to find. And that is a ban function. Is there any way to keep someone out of bot when when runing a public raidbot that does not require membership. Or will I have to try and write something?

Last resort would be to require ppl to be members of the bot, but that is not something I want.

Offline Zacix

  • Contributor
  • *******
  • Posts: 73
  • Karma: +0/-0
Bannfunction on a public raidbot
« Reply #1 on: November 11, 2005, 10:34:56 am »
I don't have anything written for BeBot specifically, but with think this module I've written for RINGBot should work pretty nice. The !ban and !unban command needs a hack in main.php to work though. main.php should be in the repository too if you want to see how it's implemented, just have a search for "is_banned". !setlimit sets the maximum number of players allowed in the bot...I'm not 100% what you are looking for, just hope this is helpful ;)

edit: I see that it won't work out-of-the-box at all now...I have a function that gets all members online in Bot.php which is needed. Anyway, minor modifications should make it work
Zacix
Current projects:
RINGBot, BeBot branch
Neutnet, RK2 Neutral massmessage network

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Bannfunction on a public raidbot
« Reply #2 on: November 11, 2005, 03:17:30 pm »
This is the module I use for chat invites, it includes a banlist.
In addition to this I have added the is_banned function to Bot.php, and added a if(is_banned($name) return false; at the beginning of is_members().

I haven't removed the use of my get_tablename and get_setting functions.
You can use the following code to solve that though (add in Bot.php):
Code: [Select]
       /*
        Returns a selected setting:
        */
        function get_setting($set)
        {
                $res = $this -> db -> select("SELECT * FROM settings"
                        . " WHERE setting = '" . $set . "'");

                if (!empty($res))
                        return $res[0][1];
                else
                        return "";
        }

        function get_tablename($table)
        {
                return $table;
        }

Offline Solerna

  • BeBot User
  • **
  • Posts: 21
  • Karma: +0/-0
Bannfunction on a public raidbot
« Reply #3 on: November 11, 2005, 06:33:24 pm »
Thanks =) Got it up and running.

 

* 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: 337
  • 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