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: Modified Blacklist  (Read 21633 times)

0 Members and 1 Guest are viewing this topic.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Modified Blacklist
« Reply #15 on: November 30, 2006, 09:18:40 pm »
This way of doing it works just fine in 0.2.x as well, you just won't have the luxury of the send_output function.

But i still heavily recommend at least using the unified command handler approach, ie having tell, pgmsg, tell2 and gc handed over to a handler function along with a flag stating it's origin.

The method displayed in the example when it comes to parsing and code location is not ideal, and is partly caused by being in between transition from the old system and the planned system. The advantage of it is that the way it's done right now is fully backwards compatible, and at the same time, will require very little work to update to the final system which will arrive hopefully in 0.5.x
BeBot Founder and Fixer Kingpin

Offline Dracutza

  • BeBot Apprentice
  • ***
  • Posts: 126
  • Karma: +0/-0
Re: Modified Blacklist
« Reply #16 on: December 03, 2006, 06:34:52 pm »
This last version is really nice.  Question about the alts feature though.  Are the alts/whois/blacklist feautures all supposed to tie into one another?

As it is now, we blacklist Player1234.  he has an alt, Player5678 which has been added to our alts list.

!whois Player1234 shows that nice "Warning! Blacklisted!::" tag. "alts" link added and upon clicking shows Player5678
!whois Player5678 does not however show the blacklist warning.  Is it supposed to?

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Modified Blacklist
« Reply #17 on: December 03, 2006, 10:24:56 pm »
If you use my modified !whois module it will...

http://bebot.link/index.php/topic,204.30.html (pay attention of other required modules).
or
http://bebot.link/index.php/topic,314.0.html (just requires the Whois cache).

ie:
Uprnet: Jahbless "Ninjans" Atmosphere is a level 213 (AT 9 - Mediocre) Male Opifex Martial Artist, Clan.::  Warning! Main Blacklisted! View Niceas's Alts

Offline Bart

  • BeBot User
  • **
  • Posts: 39
  • Karma: +0/-0
Re: Modified Blacklist
« Reply #18 on: December 16, 2006, 04:48:28 am »
ok I can't get jj's to work at all, bot just keeps telling me to ask for help. Natural's keeps telling me There isn't any person named XXXXX registered on Rubi-Ka!.

So what am I missing?

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: Modified Blacklist
« Reply #19 on: December 16, 2006, 05:17:03 am »
Make sure you don't have any extra spaces, try to capitalize the first letter in the names.

And are you using the right commands?
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline Bart

  • BeBot User
  • **
  • Posts: 39
  • Karma: +0/-0
Re: Modified Blacklist
« Reply #20 on: December 16, 2006, 05:20:11 am »
I got it to add on yours.. but now I can't get it to delete lol.. keep telling me "You must use the proper command."


Using !blacklist del XXXXX

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: Modified Blacklist
« Reply #21 on: December 16, 2006, 05:23:43 am »
Try !blacklist rem <name>
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: Modified Blacklist
« Reply #22 on: December 16, 2006, 05:33:50 am »
Also useful, place this in the Blacklist.php to global check if a user is banned.

How to use: (in another module, that you wish to see if the person is banned)
if ( !$this -> bot -> Blacklist -> is_banned($name) )
{
    Do stuff if not banned
}
else
     Do other stuff if banned



Code: [Select]
function is_banned($name)
{
$result = $this->bot->db->select("SELECT name FROM blacklist where name='" . $name . "'");
if (!empty($result))
return $name;
else
return false;
}

« Last Edit: December 16, 2006, 05:36:05 am by Naturalistic »
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline Bart

  • BeBot User
  • **
  • Posts: 39
  • Karma: +0/-0
Re: Modified Blacklist
« Reply #23 on: December 16, 2006, 05:43:53 am »
Thx a ton Naturalistc all is good :D

Offline tonyuh

  • BeBot User
  • **
  • Posts: 48
  • Karma: +0/-0
Re: Modified Blacklist
« Reply #24 on: April 20, 2007, 07:57:58 am »
Reason with ' in it seems to break the command. It will say the user has been listed but doesn't actually add the user to the database.

Offline pusikas

  • BeBot Apprentice
  • ***
  • Posts: 161
  • Karma: +0/-0
Re: Modified Blacklist
« Reply #25 on: April 20, 2007, 12:14:14 pm »
Put an addslashes function around the string you are handing to the database. Otherwise, some characters will be misinterpreted, and in theory might make it possible to inject SQL.
Can't test it right now, but something like
Code: [Select]
$this -> bot -> db -> query("INSERT INTO blacklist (whoset, name, reason) VALUES ('" . $name . "', '" . $msg . "', '" . addslashes($reason) . "')");might work. Actually, I don't think it would hurt at all to put an addslashes function around every string that gets inserted into the database.
« Last Edit: April 20, 2007, 12:21:40 pm by pusikas »
Luuv  Bot-Keeper of Vengeance ^^*

 

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