Catch server version string, from RPL_MYINFO
This commit is contained in:
parent
94d2f103b0
commit
7547eee96d
3 changed files with 9 additions and 0 deletions
|
@ -67,6 +67,11 @@ class Module(ModuleManager.BaseModule):
|
||||||
def handle_005(self, event):
|
def handle_005(self, event):
|
||||||
core.handle_005(self.events, event)
|
core.handle_005(self.events, event)
|
||||||
|
|
||||||
|
# RPL_MYINFO
|
||||||
|
@utils.hook("raw.received.004")
|
||||||
|
def handle_004(self, event):
|
||||||
|
core.handle_004(event)
|
||||||
|
|
||||||
# whois respose (nickname, username, realname, hostname)
|
# whois respose (nickname, username, realname, hostname)
|
||||||
@utils.hook("raw.received.311", default_event=True)
|
@utils.hook("raw.received.311", default_event=True)
|
||||||
def handle_311(self, event):
|
def handle_311(self, event):
|
||||||
|
|
|
@ -55,6 +55,9 @@ def handle_005(events, event):
|
||||||
events.on("received.005").call(isupport=isupport,
|
events.on("received.005").call(isupport=isupport,
|
||||||
server=event["server"])
|
server=event["server"])
|
||||||
|
|
||||||
|
def handle_004(event):
|
||||||
|
event["server"].version = event["args"][2]
|
||||||
|
|
||||||
def motd_start(event):
|
def motd_start(event):
|
||||||
event["server"].motd_lines.clear()
|
event["server"].motd_lines.clear()
|
||||||
def motd_line(event):
|
def motd_line(event):
|
||||||
|
|
|
@ -18,6 +18,7 @@ class Server(IRCObject.Object):
|
||||||
self.alias = alias
|
self.alias = alias
|
||||||
self.connection_params = connection_params
|
self.connection_params = connection_params
|
||||||
self.name = None # type: typing.Optional[str]
|
self.name = None # type: typing.Optional[str]
|
||||||
|
self.version = None # type: typing.Optional[str]
|
||||||
|
|
||||||
self.nickname = None # type: typing.Optional[str]
|
self.nickname = None # type: typing.Optional[str]
|
||||||
self.username = None # type: typing.Optional[str]
|
self.username = None # type: typing.Optional[str]
|
||||||
|
|
Loading…
Reference in a new issue