summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2007-04-24 08:56:27 +0000
committerSebastien Helleu <flashcode@flashtux.org>2007-04-24 08:56:27 +0000
commitfcc885eff01ef3776ec1b5b6260c267a3dae419c (patch)
treee1bd557d4a375ad7bc093ca7cf9c6c5fdbb9ed04 /scripts
parent7feb7752991dc1af47a534d43c630d94f3e42d49 (diff)
downloadweechat-fcc885eff01ef3776ec1b5b6260c267a3dae419c.zip
New version of ctcp.py
Diffstat (limited to 'scripts')
-rw-r--r--scripts/python/ctcp.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/python/ctcp.py b/scripts/python/ctcp.py
index ed0848510..d8459e51d 100644
--- a/scripts/python/ctcp.py
+++ b/scripts/python/ctcp.py
@@ -18,7 +18,7 @@
-- Leonid Evdokimov (weechat at darkk dot net one more dot ru)
"""
-version = "0.9"
+version = "0.10"
history = """
0.1 initial
0.2
@@ -38,6 +38,8 @@ history = """
- fixed on_msg (occasionally caused a minor fault)
0.9
- added dump_to_servchan and dump_to_current setting
+ 0.10
+ - added SILENT (asmanian)
"""
short_syntax = """[REQUEST ANSWER]"""
@@ -46,7 +48,8 @@ syntax = """ Examples:
/set_ctcp
show settings for common CTCP-Requests.
- where "OFF" means "use weechat default behaviour.
+ where "OFF" means "use weechat default behaviour,
+ "SILENT" means: "dont answer at all".
/set_ctcp VERSION I prefer using weechat $version
Reply with a fancy message.
@@ -121,6 +124,9 @@ def on_msg(server, args):
if not ans or ans == "OFF":
raise ValueError
+ if ans == "SILENT":
+ return wc.PLUGIN_RC_OK_IGNORE_ALL
+
info = {
"version": wc.get_info("version"),
"nick": wc.get_info("nick"),