aboutsummaryrefslogtreecommitdiff
path: root/modules/linelen.py
blob: 0dd41b5b1e913694f36a10623698e649df7ef1a2 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from src import ModuleManager, utils
import IRCLine

class Module(ModuleManager.BaseModule):
	def _done_connecting(self, server):
		if "LINELEN" in server.isupport:
			IRCLine.LINE_MAX = int(server.isupport['LINELEN'])

	@utils.hook("received.376")
	def end_of_motd(self, event):
		self._done_connecting(event["server"])
	@utils.hook("received.422")
	def no_motd(self, event):
		self._done_connecting(event["server"])