Novo

Forum kao aplikacija na telefonu

Dodajte forum na početni ekran i koristite ga kao aplikaciju, sa menijem na dnu ekrana.

  • 9 odgovora
  • 4.788 pregleda

Najnovija ↓

|REQ| join msg plugin zA xchat..., 23.09.2006. u 11:35 · pre 244 meseca #1
Treba mi nesto sto ce na ulasku u svaki chan da izbaci neku poruku koju mui zadam , nesto tipa kao leave msg.
Potpis
Ko zna zna, ko ne zna 6.
Re: |REQ| join msg plugin zA xchat..., 16.01.2007. u 16:20 · pre 240 meseci #5
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)
Potpis
You need to install an RTFM interface.
Re: |REQ| join msg plugin zA xchat..., 16.01.2007. u 22:58 · pre 240 meseci #6
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?
Potpis
[img]http://www.linuxcounter.org/cgi-bin/certificate.cgi/440562[/img]
[img]http://img73.imageshack.us/img73/7752/userbar330397yt9.gif[/img]
Re: |REQ| join msg plugin zA xchat..., 17.01.2007. u 00:11 · pre 240 meseci #7
Izgleda da je Python plugin uklonjen iz Windows verzije (privremeno?), tako da tamo nece raditi.
Potpis
You need to install an RTFM interface.
Re: |REQ| join msg plugin zA xchat..., 01.02.2007. u 08:04 · pre 240 meseci #8
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.
Potpis
Ko zna zna, ko ne zna 6.
Re: |REQ| join msg plugin zA xchat..., 01.02.2007. u 17:41 · pre 240 meseci #9
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
Potpis
You need to install an RTFM interface.
Re: |REQ| join msg plugin zA xchat..., 01.02.2007. u 21:24 · pre 240 meseci #10
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.
Prijavite se da biste odgovorili u ovoj temi.PrijavaRegistracija

Premeštanje teme