i konacna verzija izgleda ovako
Code:
__module_name__ = "Join Msg"
__module_version__ = "0.2"
__module_description__ = "This script does two things."
import xchat
#import random
timeout = 10000 # in ms
concomm = 'playprivatelog'
#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)
Potpis
Ko zna zna, ko ne zna 6.