BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => AO 0.6 support => Topic started by: Sabkor on April 02, 2009, 05:09:32 am

Title: IRC colors not stripped when passed back to guildchat
Post by: Sabkor on April 02, 2009, 05:09:32 am
I don't think that IRC colors are being stripped when passed into a relay guild. I have two guilds connected via an IRC channel and on certain events (like logon or logoff) that are announced in color in IRC, we are getting ASCII characters in the other guild-chat.

Example (in something like PHP code, for easier reading of ASCII codes):

chr(2)." ". chr(2).chr(3)."3**** NAME has logged off."

I noticed in the IRC.php module file, that these are the same ASCII codes being used to colorize the strings in IRC, so I would imagine they should just be stripped somewhere.

Title: Re: IRC colors not stripped when passed back to guildchat
Post by: Khalem on April 06, 2009, 11:48:01 pm
This should now be fixed in bzr repo.

For 0.6 see http://bazaar.launchpad.net/~bebot-devel/bebot/stable-0.6/annotate/head%3A/modules/IRC.php
Title: Re: IRC colors not stripped when passed back to guildchat
Post by: Sabkor on April 07, 2009, 06:31:29 pm
There was a small error in the code, line 1053 reads:
Code: [Select]
$txt = "##irc_group##" . $this -> bot -> core("settings") -> get("Irc", "Guildprefix") . "##end## ##irc_user##" . $data -> nick . "##end####irc_text## is known as##end## ##irc_user##". $data -> message"##end##";
and it should be
Code: [Select]
$txt = "##irc_group##" . $this -> bot -> core("settings") -> get("Irc", "Guildprefix") . "##end## ##irc_user##" . $data -> nick . "##end####irc_text## is known as##end## ##irc_user##". $data -> message."##end##";
Note the concat between $data->message and "##end##" near the end of the line.

And thanks Khalem, your fix works perfectly, no more high-ASCII chars in guildchat.

Title: Re: IRC colors not stripped when passed back to guildchat
Post by: Khalem on April 07, 2009, 07:27:58 pm
Fixed in bzr now. Fixed it last night and forgot to commit
Title: Re: IRC colors not stripped when passed back to guildchat
Post by: Sabkor on November 25, 2009, 04:13:47 am
Just upgraded from v0.6.4 to v0.6.6 and this problem is back (high ASCII chars in GuildChat).  Does this mean the latest revision of the IRC.php file is not being included in the downloadable package? (I'm just a part-time/casual code monkey, never done much with versioning systems.)
Title: Re: IRC colors not stripped when passed back to guildchat
Post by: Sabkor on November 25, 2009, 03:24:51 pm
Just answered my own question, by re-downloading the latest IRC.php file from the repository. Still having the same issue, after a bot restart.
Title: Re: IRC colors not stripped when passed back to guildchat
Post by: Khalem on November 26, 2009, 12:11:56 am
Well that is certainly very odd since the code that caused the issue has been removed and I just verified is no longer present at all.

Please submit a bug report with as much detail as you can provide and I will try to look at it when I can spare some time away from studies

SimplePortal 2.3.7 © 2008-2025, SimplePortal