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

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

Author Topic: Banlist Module - Banlist functionality  (Read 30713 times)

0 Members and 2 Guests are viewing this topic.

Offline craized

  • Contributor
  • *******
  • Posts: 165
  • Karma: +0/-0
    • http://www.craized.net
Re: Banlist Module - Banlist functionality
« Reply #15 on: January 23, 2006, 06:10:01 am »
Sorry about this, I'm hitting another AO dry spell, so I'm not working on this stuff anymore. I did however fix this one already and didn't upload it because I'm getting an error I can't figure out. I don't doubt that you guys will finish/fix/find out nothing is wrong with this no problem. I'll have my web version up, but I'm also going to start posting the code in the topic post since this will probably need tweaking.
Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]


Offline craized

  • Contributor
  • *******
  • Posts: 165
  • Karma: +0/-0
    • http://www.craized.net
Re: Banlist Module - Banlist functionality
« Reply #16 on: March 13, 2006, 03:51:31 pm »
I've updated the code for my banlist, but I still need help. For some reason, it's not storing banned names in the database. Also, I've left out the optional ban time because I can't get the regex right. If you find more bugs, please post them. I've also added a history function for the sake of checking if a user has been banned previously.

Edit: Fixed the database issues. Everything works except the time so far
Edit: Fixed the ban time as well. Everything is ready, although I'm sure there are still bugs and improvements to be made
« Last Edit: March 13, 2006, 08:20:42 pm by craized »
Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]


Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: Banlist Module - Banlist functionality
« Reply #17 on: March 13, 2006, 07:42:12 pm »
Just an add:

If someone is banned, you can make it so they can't re-join the bot. Inside PrivGroup.php, inside the function tell ():
$result = $this->bot->db->select("SELECT name FROM banlist where name='" . $nameofpersonbanned . "'");

Then after, do a check if (!empty($result)) { send_tell ( "You're banned loser!" ) } else { all the join, invite, stuff }

Hope that helps out someone :)
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline craized

  • Contributor
  • *******
  • Posts: 165
  • Karma: +0/-0
    • http://www.craized.net
Re: Banlist Module - Banlist functionality
« Reply #18 on: March 13, 2006, 08:27:21 pm »
Also, you can use:
Code: [Select]
if($this -> commands['tell']['banlist'] -> bancheck($who)) {
"You're banned loser."
}
else {
invite stuff
}

I put the function in the module, it will return true if you're banned, or false if you're not banned. When the bot starts, it keeps the entire banlist in a variable, so saves more DB calls.
Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]


Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: Banlist Module - Banlist functionality
« Reply #19 on: March 13, 2006, 09:17:24 pm »
That works too :)
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline craized

  • Contributor
  • *******
  • Posts: 165
  • Karma: +0/-0
    • http://www.craized.net
Re: Banlist Module - Banlist functionality
« Reply #20 on: March 14, 2006, 10:00:21 am »
This is the first stable release in my opinion. Fixed a lot of stuff, and it actually works now.

Enjoy :D
Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]


Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Banlist Module - Banlist functionality
« Reply #21 on: March 14, 2006, 03:53:51 pm »
*tagging this for merging into SVN later*
BeBot Founder and Fixer Kingpin

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: Banlist Module - Banlist functionality
« Reply #22 on: March 14, 2006, 07:11:06 pm »
Can't test it out myself :p

Using my own modified ban module >_<
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline Pharexys

  • BeBot Apprentice
  • ***
  • Posts: 117
  • Karma: +0/-0
Re: Banlist Module - Banlist functionality
« Reply #23 on: May 13, 2006, 02:12:40 pm »
I tested ur module, and i get some errors.

To [xxx]: !banlist
[xxx]: Usage: !ban <name> [reason] <duration>
To [xxx]: !unban
[xxx]: Usage: !unban <name>
To [xxx]: !ban
[xxx]: Usage: !ban <name> [reason] <duration>
To [xxx]: !banned
[xxx]: Usage: !ban <name> [reason] <duration>

What i mean is.. It doesnt show a banlist when u type !banlist,
Also after i ban someone, it doesnt kick him from chat(dunno if you forgot this or didnt wanted it)
Checked code a bit.. but since im not a coder cant find the problem
also used your updated prvgroup.php
Anything i did wrong or is it bugged?

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: Banlist Module - Banlist functionality
« Reply #24 on: May 03, 2007, 12:07:44 am »
i have the same prob
ban seem to work but i can get it to list who is banned and just get same replies as you

Offline Dracutza

  • BeBot Apprentice
  • ***
  • Posts: 126
  • Karma: +0/-0
Re: Banlist Module - Banlist functionality
« Reply #25 on: December 19, 2007, 04:55:07 pm »
Is there a way to have an unbanned (ban del, or timer expires) member go back to member as opposed to anonymous?

 

* Recent Posts
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 ]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm ]

* Who's Online
  • Dot Guests: 391
  • 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