colo.py
This commit is contained in:
parent
0217c74e7a
commit
04d736bbcf
@ -150,16 +150,17 @@ def cb_colo (data, mod, buf, input):
|
|||||||
|
|
||||||
fmt = "%".join(fmt)
|
fmt = "%".join(fmt)
|
||||||
nest = is_command(fmt)
|
nest = is_command(fmt)
|
||||||
iptr = weechat.infolist_get("irc_server", "", weechat.buffer_get_string(
|
servername = weechat.buffer_get_string(buf, "localvar_server")
|
||||||
buf, "localvar_server"))
|
iptr = weechat.infolist_get("irc_server", "", servername)
|
||||||
weechat.infolist_next(iptr)
|
weechat.infolist_next(iptr)
|
||||||
long_lines = weechat.infolist_integer(iptr, "cap_long_lines")
|
long_lines = weechat.infolist_integer(iptr, "cap_long_lines")
|
||||||
weechat.infolist_free(iptr)
|
weechat.infolist_free(iptr)
|
||||||
|
|
||||||
l = ((512 if long_lines else 0) + 409 - len(fmt) -
|
nicklen = weechat.info_get("irc_server_isupport_value", "%s,NICKLEN" %
|
||||||
int( weechat.info_get("irc_server_isupport_value", "%s,NICKLEN" %
|
servername)
|
||||||
weechat.buffer_get_string(buf, "localvar_server")) )
|
if not nicklen: nicklen = 9
|
||||||
)
|
|
||||||
|
l = ((512 if long_lines else 0) + 409 - len(fmt) - int(nicklen))
|
||||||
o = []
|
o = []
|
||||||
for line in input.replace("\r", "\n").split("\n"):
|
for line in input.replace("\r", "\n").split("\n"):
|
||||||
if not line: continue
|
if not line: continue
|
||||||
|
Loading…
Reference in New Issue
Block a user