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: IRC colors not stripped when passed back to guildchat  (Read 2966 times)

0 Members and 2 Guests are viewing this topic.

Offline Sabkor

  • Contributor
  • *******
  • Posts: 30
  • Karma: +0/-0
IRC colors not stripped when passed back to guildchat
« 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.


Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: IRC colors not stripped when passed back to guildchat
« Reply #1 on: April 06, 2009, 11:48:01 pm »
BeBot Founder and Fixer Kingpin

Offline Sabkor

  • Contributor
  • *******
  • Posts: 30
  • Karma: +0/-0
Re: IRC colors not stripped when passed back to guildchat
« Reply #2 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.


Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: IRC colors not stripped when passed back to guildchat
« Reply #3 on: April 07, 2009, 07:27:58 pm »
Fixed in bzr now. Fixed it last night and forgot to commit
BeBot Founder and Fixer Kingpin

Offline Sabkor

  • Contributor
  • *******
  • Posts: 30
  • Karma: +0/-0
Re: IRC colors not stripped when passed back to guildchat
« Reply #4 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.)

Offline Sabkor

  • Contributor
  • *******
  • Posts: 30
  • Karma: +0/-0
Re: IRC colors not stripped when passed back to guildchat
« Reply #5 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.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: IRC colors not stripped when passed back to guildchat
« Reply #6 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

BeBot Founder and Fixer Kingpin

 

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