Snippet Library

Browse | Submit A New Snippet | Create A Package

XChat: Only send /away to current channel

Type:
Function
Category:
Other
License:
GNU General Public License
Language:
Python
 
Description:
This is an xchat module to only send /away and /back to the window that has focus. This was written for #PHP on freenode, and is hereby released under the GPL. Note that your XChat will have to be made with Python support.

Versions Of This Snippet:

Snippet ID Download Version Date Posted Author Delete
412004-04-13 16:25Joey Smith

Download a raw-text version of this code by clicking on "Download Version"

 


Latest Snippet Version: 1

import xchat __module_name__ = "privaway" __module_version__ = "1.0" __module_description__ = "Private away (only sends action to current channel)" def onaway_cb(word, word_eol, userdata): if len(word) < 2: print "Not enough arguments" else: result = "AWAY" announce = "" for part in word: if part == "paway": continue announce += " " + part result += announce announce = "ME away: " + announce xchat.command(result) xchat.command(announce) return xchat.EAT_ALL def onback_cb(word, word_eol, userdata): xchat.command("BACK") xchat.command("ME back") return xchat.EAT_ALL xchat.hook_command("paway", onaway_cb) xchat.hook_command("pback", onback_cb)

Submit a new version

You can submit a new version of this snippet if you have modified it and you feel it is appropriate to share with others..

Powered By FusionForge
Show source