onion python script for xchat2



__module_name__ = "onion script for xchat2"

__module_version__ = "0.1"

__module_description__ = "Python module for xchat2"



import xchat

import string

xchat.prnt("onion module_load compleate!")



def oni_cb(word, word_eol, userdata):

if len(word) < 2:

print "Second arg must be the message!"

else:

channel_name = xchat.get_info("channel")

xchat.command("msg %s message is %s" % (channel_name,word[1]))

return xchat.EAT_ALL



xchat.hook_command("oni", oni_cb, help="/message string")



def slap_cb(word, word_eol, userdata):

if len(word) < 2:

print "Second arg must be the message!"

else:

channel_name = xchat.get_info("channel")

xchat.command("me slap %s ..." % (word[1]))

return xchat.EAT_ALL



xchat.hook_command("slap", slap_cb, help="/message string")



ps. 지금보니 대단히 졸렬하군요..새버전을 빨리 다듬어서 올려야겠습니다..-.-;

ONIONMiXER.net
ONIONMiXER.net RSS feed 맨위로 이동