(self, channel, *params)
| 130 | |
| 131 | # Event in a channel |
| 132 | def event(self, channel, *params): |
| 133 | if channel in self.channels: # We are joined to channel |
| 134 | if channel == "siteChanged": |
| 135 | site = params[0] |
| 136 | site_info = self.formatSiteInfo(site, create_user=False) |
| 137 | if len(params) > 1 and params[1]: # Extra data |
| 138 | site_info.update(params[1]) |
| 139 | self.cmd("setSiteInfo", site_info) |
| 140 | elif channel == "serverChanged": |
| 141 | server_info = self.formatServerInfo() |
| 142 | self.cmd("setServerInfo", server_info) |
| 143 | elif channel == "announcerChanged": |
| 144 | site = params[0] |
| 145 | announcer_info = self.formatAnnouncerInfo(site) |
| 146 | if len(params) > 1 and params[1]: # Extra data |
| 147 | announcer_info.update(params[1]) |
| 148 | self.cmd("setAnnouncerInfo", announcer_info) |
| 149 | |
| 150 | # Send response to client (to = message.id) |
| 151 | def response(self, to, result): |
no test coverage detected