v2nek / webchat2

Automatically exported from code.google.com/p/webchat2
GNU General Public License v2.0
0 stars 0 forks source link

MOTD - Page freezes if server has no MOTD #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Simple, join a server with no MOTD and see!
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Temp fix: Add the following function in IRCClient.php

    private function err_nomotd($from, $command, $to, $param)
    {
        if (!empty($this->channel)) {
            $this->join($this->channel);
        }
        foreach ($this->server_info as $key => $val) {

                $key = htmlspecialchars($key, 
ENT_QUOTES, 'UTF-8');
                $val = htmlspecialchars($val, 
ENT_QUOTES, 'UTF-8');
                $this->send_script("chat.onServerInfo
('$key','$val');");
        }
             $this->send_script("chat.onMotd('MOTD File is missing');");
    }

Original issue reported on code.google.com by oas...@gmail.com on 22 Aug 2007 at 10:26

GoogleCodeExporter commented 9 years ago
patch works
just adding it inside the class works

Original comment by tonyh...@gmail.com on 5 Jun 2009 at 2:44