Citat:
fade: moze li se ovaj plugin prepraviti da ukuca jednu poruku kada se konektam posle npr 10 sekundi , znaci poruka bi bila /quote playprivatelog , posto imam nekih problema tu , nece da mi izbacuje kada imam pm-ova.
Code:
!/usr/bin/env python
__module_name__ = "Join Msg"
__module_version__ = "0.2"
__module_description__ = "This script does two things."
import xchat
#import random
timeout = 10000 # in ms
concomm = 'bhelp'
defmsga = 'hello'
#defmsgb = ['hello','hi','cheers','i\'m here','bla']
def on_connect(word, word_eol, userdata):
def scom(userdata):
xchat.command(concomm)
return xchat.EAT_NONE
xchat.hook_timer(timeout, scom)
return xchat.EAT_ALL
def on_join(word, word_eol, userdata):
xchat.command('say %s' % defmsga)
#xchat.command('say %s' % random.choice(defmsgb))
return xchat.EAT_ALL
xchat.hook_print('Connected', on_connect)
xchat.hook_print('You Join', on_join)
Za sve ostale eventualne zelje dokumentacija se moze naci ovdje:
http://labix.org/xchat-python
You need to install an RTFM interface.