Browse Source

qotd: Use maxlen for recv

For QOTD, 512 is not mandatory, so allow to fetch more data
if user asks (by using "-c" argument).
Alois Mahdal 10 years ago
parent
commit
68aff87272
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      plugins/qotd.py

+ 1
- 1
plugins/qotd.py View File

19
     def _fetch_qotd(self):
19
     def _fetch_qotd(self):
20
         s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
20
         s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
21
         s.connect((self.host, self.port))
21
         s.connect((self.host, self.port))
22
-        self.qotd = s.recv(512).strip()
22
+        self.qotd = s.recv(self.data.maxlen).strip()
23
         s.close()
23
         s.close()
24
 
24
 
25
     def render_plain(self):
25
     def render_plain(self):