0.6.5.(snapshot)-rev135 irc-nickchange relays

Bug #417476 reported by Getrix on 2009-08-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Thomas Juberg

Bug Description

IRC nickname changes are relayed to GC when "AnnounceTo"=none and UseGuildRelay=Off
There is no settings about the nickname changes on IRC. This bug/missing have been there from some versions as far i remember.

AnnounceTo: none
Description: Where should joins and leaves to the irc channel be announced to?

UseGuildRelay: Off
Description: Should chat coming from IRC also be relayed over the guild relay if it's set up?

Thomas Juberg (thomas-juberg) wrote :

Thanks for the report. Fixed in bzr.

Changed in bebot:
assignee: nobody → Thomas Juberg (thomas-juberg)
importance: Undecided → Medium
milestone: none → 0.6.5
status: New → Fix Committed
Getrix (espein0) wrote :

Sorry to inform you, but the bot still relays nickchanges to guildchat.

Think the correct changes to function irc_nick would be something like this. Did some testing and it looked good:

function irc_nick(&$irc, &$data)
  if ($data->nick != $this->bot->core("settings")->get("Irc", "Nick"))
   unset($this -> irconline[strtolower($data -> nick)]);
   $this -> irconline[strtolower($data -> message)] = strtolower($data -> message);

                if (strtolower($this->bot->core("settings")->get("Irc", "AnnounceTo")) != "none")
   $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##";
          $this -> bot -> send_output("", $txt, $this -> bot -> core("settings") -> get("Irc", "Chat"));

  if ($this -> bot -> core("settings") -> get("Irc", "Useguildrelay") && $this -> bot -> core("settings") -> get("Relay", "Relay"))
   $this -> bot -> core("relay") -> relay_to_bot($txt);

  $this -> bot -> db -> query("UPDATE #___online SET nickname = '".$data -> message."' WHERE botname = '".$this -> bot -> botname . " - IRC' AND nickname = '".$data -> nick."'");

Getrix (espein0) on 2009-08-22
Changed in bebot:
status: Fix Committed → New
Thomas Juberg (thomas-juberg) wrote :

This is what happens when you mix alcohol with something that seems like a quick fix.

Your fix is partly correct, however we need $txt to be set as it is used in the next if() check.

A proper fix should be in bzr now, if not I'll look at it in the morning

Changed in bebot:
status: New → In Progress
Changed in bebot:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers