L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2008, 01:08:06 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Modules for older versions > 0.2.x Custom/Unofficial Modules > Topic: Modified Blacklist
Pages: 1 [2]   Go Down
« previous next »
Print
Author Topic: Modified Blacklist  (Read 2125 times)
0 Members and 1 Guest are viewing this topic.
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: Modified Blacklist
« Reply #15 on: November 30, 2006, 03: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
Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
Dracutza
Apprentice
***
Offline Offline

Posts: 126


Re: Modified Blacklist
« Reply #16 on: December 03, 2006, 12: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?
Logged
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Modified Blacklist
« Reply #17 on: December 03, 2006, 04:24:56 PM »

If you use my modified !whois module it will...

http://bebot.shadow-realm.org/index.php/topic,204.30.html (pay attention of other required modules).
or
http://bebot.shadow-realm.org/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
Logged
Bart
Rookie
**
Offline Offline

Posts: 39


Re: Modified Blacklist
« Reply #18 on: December 15, 2006, 10:48:28 PM »

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?
Logged
Naturalistic
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 221


Re: Modified Blacklist
« Reply #19 on: December 15, 2006, 11:17:03 PM »

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?
Logged

220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php
Bart
Rookie
**
Offline Offline

Posts: 39


Re: Modified Blacklist
« Reply #20 on: December 15, 2006, 11:20:11 PM »

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
Logged
Naturalistic
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 221


Re: Modified Blacklist
« Reply #21 on: December 15, 2006, 11:23:43 PM »

Try !blacklist rem <name>
Logged

220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php
Naturalistic
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 221


Re: Modified Blacklist
« Reply #22 on: December 15, 2006, 11:33:50 PM »

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:
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 15, 2006, 11:36:05 PM by Naturalistic » Logged

220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php
Bart
Rookie
**
Offline Offline

Posts: 39


Re: Modified Blacklist
« Reply #23 on: December 15, 2006, 11:43:53 PM »

Thx a ton Naturalistc all is good Cheesy
Logged
tonyuh
Rookie
**
Offline Offline

Posts: 48


Re: Modified Blacklist
« Reply #24 on: April 20, 2007, 12: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.
Logged
pusikas
Experienced
****
Offline Offline

Posts: 161


Re: Modified Blacklist
« Reply #25 on: April 20, 2007, 05:14:14 AM »

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:
$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, 05:21:40 AM by pusikas » Logged

Luuv  Bot-Keeper of Vengeance ^^*
Pages: 1 [2]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Modules for older versions > 0.2.x Custom/Unofficial Modules > Topic: Modified Blacklist
« previous next »
 
Jump to:  

Recent
Change text in remember "...
by gerborg
[November 21, 2008, 05:14:57 PM]

Log playtime from buddys ...
by Temar
[November 20, 2008, 10:33:57 AM]

Vote Core module and Simp...
by Temar
[November 19, 2008, 09:26:52 AM]

Restrict access for one m...
by Organizer
[November 19, 2008, 03:21:19 AM]

Custom / Revised Modules ...
by Elesar1
[November 17, 2008, 03:51:46 PM]

TWC
by Temar
[November 16, 2008, 11:39:12 AM]

Are there any FUN modules...
by Elesar1
[November 15, 2008, 07:39:15 PM]

Call to a member function...
by exxie
[November 15, 2008, 09:29:31 AM]

Ported Modules
by Alreadythere
[November 14, 2008, 06:10:07 PM]

cURL and other non-defaul...
by Temar
[November 14, 2008, 04:11:44 PM]
Stats
Members
Total Members: 1235
Latest: DDDepressionnn
Stats
Total Posts: 11037
Total Topics: 1496
Online Today: 18
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 0
Guests: 15
Total: 15

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.261 seconds with 29 queries. (Pretty URLs adds 0.036s, 4q)
Loading...