colo.py: long lines if server supports
This commit is contained in:
parent
b93f5c7def
commit
262911606f
@ -10,7 +10,7 @@ import weechat
|
||||
|
||||
SCRIPT_NAME = "colo"
|
||||
SCRIPT_AUTHOR = "The Krusty Krab <wowaname@volatile.ch>"
|
||||
SCRIPT_VERSION = "2.1"
|
||||
SCRIPT_VERSION = "2.2"
|
||||
SCRIPT_LICENSE = "Public domain"
|
||||
SCRIPT_DESC = "Makes your chats noticable"
|
||||
|
||||
@ -150,8 +150,13 @@ def cb_colo (data, mod, buf, input):
|
||||
|
||||
fmt = "%".join(fmt)
|
||||
nest = is_command(fmt)
|
||||
iptr = weechat.infolist_get("irc_server", "", weechat.buffer_get_string(
|
||||
buf, "localvar_server"))
|
||||
weechat.infolist_next(iptr)
|
||||
long_lines = weechat.infolist_integer(iptr, "cap_long_lines")
|
||||
weechat.infolist_free(iptr)
|
||||
|
||||
l = (409 - len(fmt) -
|
||||
l = ((512 if long_lines else 0) + 409 - len(fmt) -
|
||||
int( weechat.info_get("irc_server_isupport_value", "%s,NICKLEN" %
|
||||
weechat.buffer_get_string(buf, "localvar_server")) )
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user