[ fade @ 23.09.2006. 10:35 ] @
Treba mi nesto sto ce na ulasku u svaki chan da izbaci neku poruku koju mui zadam , nesto tipa kao leave msg.
[ Napushenko @ 14.01.2007. 18:08 ] @
Ochel ti ovo pomoc?

Code:
on 1:join:#serbia:{/msg $nick Dobrodoso na kanal....

[ LaMpiR @ 14.01.2007. 18:54 ] @
Citat:
Napushenko: Ochel ti ovo pomoc?

Code:
on 1:join:#serbia:{/msg $nick Dobrodoso na kanal....

To bi bilo za mIRC...
[ Napushenko @ 16.01.2007. 00:18 ] @
Nisam vidio da je za XChat...a za XChat ne verujem da postoji uopste.
[ anrxc @ 16.01.2007. 15:20 ] @
Code:

#!/usr/bin/env python

__module_name__ = "Join Msg"
__module_version__ = "0.1"
__module_description__ = "This script does something."

import xchat
#import random

msga = 'hello'

#msgb = ['hello','hi','cheers','i\'m here','bla']

def on_join(word, word_eol, userdata):

    xchat.command('say %s' % msga)
    #xchat.command('say %s' % random.choice(msgb))

    return xchat.EAT_ALL

xchat.hook_print('You Join', on_join)
[ Napushenko @ 16.01.2007. 21:58 ] @
Citat:
anrxc
Code:

#!/usr/bin/env python

__module_name__ = "Join Msg"
__module_version__ = "0.1"
__module_description__ = "This script does something."

import xchat
#import random

msga = 'hello'

#msgb = ['hello','hi','cheers','i\'m here','bla']

def on_join(word, word_eol, userdata):

    xchat.command('say %s' % msga)
    #xchat.command('say %s' % random.choice(msgb))

    return xchat.EAT_ALL

xchat.hook_print('You Join', on_join)


Jel ovo za Windows ili za Linux?
Btw,gdje da ovo stavim u XChatu?
[ anrxc @ 16.01.2007. 23:11 ] @
Izgleda da je Python plugin uklonjen iz Windows verzije (privremeno?), tako da tamo nece raditi.
[ fade @ 01.02.2007. 07:04 ] @
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.
[ anrxc @ 01.02.2007. 16:41 ] @
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
[ fade @ 01.02.2007. 20:24 ] @
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)