BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Age of Conan Archive => AoC 0.6 support => Topic started by: knuckle on December 11, 2009, 11:25:28 am

Title: Apostrophe in nickname
Post by: knuckle on December 11, 2009, 11:25:28 am
Hi all.

One Person in my Guild has bad nickname with Apostophe inside (Arrow'man).
What can i do in that sitation? MB there is entry point where i can add htmlspecialchars function? Check all bot's code - very difficult job, I think. Any ideas? MB any one had such problem? Thx you all.

Errors in log:
--------
MySQL ERROR(# 3) on query: SELECT char_id FROM guildbot_users WHERE nickname = 'Arrow'man'
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'man'' at line 1MySQL ERROR(# 4) on query: SELECT char_id FROM guildbot_users WHERE nickname = 'Arrow'man'
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'man'' at line 1MySQL ERROR(# 5) on query: SELECT user_level FROM guildbot_users WHERE nickname = 'Arrow'man'
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'man'' at line 1MySQL ERROR(# 6) on query: SELECT char_id, user_level FROM guildbot_users WHERE nickname = 'Arrow'man'
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'man'' at line 1MySQL ERROR(# 7) on query: INSERT INTO guildbot_users (char_id, nickname, added_by, added_at, user_level, notify) VALUES('268606455', 'Arrow'man', 'Guildbot', '1260525223', '2', '1')
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'man', 'Guildbot', '1260525223', '2', '1')' at line 1Guildbot [BUDDY]  [BUDDY-ADD]     Arrow'man
Guildbot [TELL] [OUT]   -> Arrow'man: Guildbot has added you to the bot.
MySQL ERROR(# 8) on query: SELECT * FROM whois WHERE nickname = 'Arrow'man'
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'man'' at line 1MySQL ERROR(# 9) on query: SELECT * FROM craftingclass WHERE name = 'Arrow'man'
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'man'' at line 1MySQL ERROR(# 10) on query: INSERT INTO whois (id, nickname, level, class, craft1, craft2, location, online, updated) VALUES ('268606455', 'Arrow'man', '38', 'Ranger', '', '', 204687, 1, '1260525223') ON DUPLICATE KEY UPDATE id = VALUES(id), level = VALUES(level), class = VALUES(class), craft1 = VALUES(craft1), craft2 = VALUES(craft2), online = VALUES(online), location = VALUES(location),  updated = VALUES(updated)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'man', '38', 'Ranger', '', '', 204687, 1, '1260525223') ON DUPLICATE KEY UPDATE ' at line 1Guildbot [BUDDY]    [LOG]   Arrow'man changed status [1] (not on notify)
MySQL ERROR(# 11) on query: SELECT char_id FROM guildbot_users WHERE nickname = 'Arrow'man'
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'man'' at line 1MySQL ERROR(# 12) on query: SELECT char_id FROM guildbot_users WHERE nickname = 'Arrow'man'
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'man'' at line 1MySQL ERROR(# 13) on query: SELECT * FROM whois WHERE nickname = 'Arrow'man'
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'man'' at line 1MySQL ERROR(# 14) on query: SELECT * FROM craftingclass WHERE name = 'Arrow'man'
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'man'' at line 1MySQL ERROR(# 15) on query: INSERT INTO whois (id, nickname, level, class, craft1, craft2, location, online, updated) VALUES ('268606455', 'Arrow'man', '38', 'Ranger', '', '', 204687, 1, '1260525223') ON DUPLICATE KEY UPDATE id = VALUES(id), level = VALUES(level), class = VALUES(class), craft1 = VALUES(craft1), craft2 = VALUES(craft2), online = VALUES(online), location = VALUES(location),  updated = VALUES(updated)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'man', '38', 'Ranger', '', '', 204687, 1, '1260525223') ON DUPLICATE KEY UPDATE ' at line 1MySQL ERROR(# 16) on query: SELECT char_id FROM guildbot_users WHERE nickname = 'Arrow'man'
------

P.S: Sorry for my english
Title: Re: Apostrophe in nickname
Post by: Temar on December 12, 2009, 05:56:04 pm
that nickname is going to make ALOT of issues with the bot
with modules as well as mysql
Title: Re: Apostrophe in nickname
Post by: Khalem on December 13, 2009, 01:23:48 pm
Since it seems AoC is allowig such names, we have no other option but to support it.

But as it stands, this is going to break things badly.
Title: Re: Apostrophe in nickname
Post by: Glarawyn on December 16, 2009, 01:26:02 am
More mysql_real_escape_string() needed it seems.

Or addslashes() & stripslashes()...
Title: Re: Apostrophe in nickname
Post by: Alreadythere on December 16, 2009, 11:51:39 pm
It's not only mysql making trouble, lot's of regular expressions assume only letters in the nicks.
Title: Re: Apostrophe in nickname
Post by: Glarawyn on December 17, 2009, 05:50:34 am
People still play AoC?  :o  :P  :o

People still play AO?  :P  :o  :P
Title: Re: Apostrophe in nickname
Post by: Getrix on December 17, 2009, 07:11:05 am
Its probly RU and PL that allow char other then letters..
EU client/server do not allow ' etc
SimplePortal 2.3.7 © 2008-2025, SimplePortal