![]() |
|
|||||||
| Tcl scripting Tcl scripting related questions |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Junior Member
Join Date: Dec 2004
Location: Cu mata in dormitor
Age: 20
Posts: 46
Rep Power: 0 ![]() |
As dori si eu un tcl cu !plata !servici ...... pentru un canal de psybnc/..... imi poate da si mie cineva un tcl va rog frumos
ca imi trebuie si mie
|
|
|
|
|
|
#2 (permalink) |
|
TCB & Ratings projects Member, #Mythic representative
|
am lucrat la ceva. E ff simplu dar ar trebui sa mearga.
Code:
## aici setezi ce vrei sa zica cand se da pe canal comanda !psybnc
set psybnc {
"line 1"
"line 2"
}
## aici setezi ce vrei sa zica cand se da pe canal comanda !eggdrop
set eggdrop {
"line 1"
"line 2"
}
## aici setezi ce vrei sa zica cand se da pe canal comanda !shell
set shell {
"line 1"
"line 2"
}
## aici setezi ce vrei sa zica cand se da pe canal comanda !plata
set plata {
"line 1"
"line 2"
}
## aici setezi ce vrei sa zica cand se da pe canal cimanda !vhosts
set vhosts {
"line 1"
"line 2"
}
## aici setezi ce vrei sa zica cand se da pe canal comanda !contact
set contact {
"line 1"
"line 2"
}
bind pub - !psybnc pub:psybnc
proc pub:psybnc {nick uhost hand chan text} {
global psybnc
foreach line $psybnc { puthelp "NOTICE $nick :$line" }
}
bind pub - !eggdrop pub:eggdrop
proc pub:eggdrop {nick uhost hand chan text} {
global eggdrop
foreach line $eggdrop { puthelp "NOTICE $nick :$line" }
}
bind pub - !shell pub:shell
proc pub:shell {nick uhost hand chan text} {
global shell
foreach line $shell { puthelp "NOTICE $nick :$line" }
}
bind pub - !plata pub:plata
proc pub:plata {nick uhost hand chan text} {
global plata
foreach line $plata { puthelp "NOTICE $nick :$line" }
}
bind pub - !vhosts pub:vhosts
proc pub:vhosts {nick uhost hand chan text} {
global vhosts
foreach line $vhosts { puthelp "NOTICE $nick :$line" }
}
bind pub - !contact pub:contact
proc pub:contact {nick uhost hand chan text} {
global contact
foreach line $contact { puthelp "NOTICE $nick :$line" }
}
daca apar probleme dai reply aci cu eroarea si cine se pricepe sa faca un antiflood il rog sa posteze k sa vad si eu cum se face si k sa nu riscam sa supunem botul lui UltraS99 la flood |
|
|
|
|
|
#3 (permalink) |
|
Member
|
arcade sper ca nu te superi daca iti dau niste sfaturi/tips
E un script functional dar cu prea multe linii si prea multe lucruri in plus, ai putea face asa ceva folosind mult mai putine linii de cod. Citeste: http://www.tcl.tk/man/tcl8.5/TclCmd/array.htm Code:
(6) PUBM (stackable)
bind pubm <flags> <mask> <proc>
procname <nick> <user@host> <handle> <channel> <text>
Description: just like MSGM, except it's triggered by things said
on a channel instead of things /msg'd to the bot. The mask is
matched against the channel name followed by the text and can
contain wildcards. Also, if a line triggers a PUB bind, it will not
trigger a PUBM bind.
Module: irc
si ai pune !commands !eggs la cuvinte keye P.S Nu am timp sa termin cod, dar o sa il pun in 2/3 zile.
__________________
Owner of #ro-tcl |
|
|
|
|
|
#4 (permalink) |
|
Member
|
Aici:
Code:
## $Id: prices.tcl, version 0.0 , ggdrop-1.6.x 2005 dpgc@purehype.net Exp $
## Author: Kurupt
## Info: Will responde for some commands
## Thanks to:
# smart@UnderNet#ro-tcl
#
## Contact: mail: dpgc@purehype.net
# irc : #ro-tcl (on undernet)
# web : http://k.aitia.info
## START
# cuvintele
# Variabile
set price(psybnc) {
"haribo macht kinder froh linie 1"
"linie 2"
}
set price(eggdrop) {"haribo macht kinder froh linie 1"}
set price(shell) {"haribo macht kinder froh linie 1"}
set price(vhost) {"haribo macht kinder froh linie 1"}
set price(plata) {"haribo macht kinder froh linie 1"}
set price(contact) {"haribo macht kinder froh linie 1"}
#seteaza cuvintele
set price(1) "!psybnc"
set price(2) "!eggdrop"
set price(3) "!shell"
set price(4) "!vhost"
set price(5) "!plata"
set price(6) "!contact"
## BINDS
bind pub - $price(1) {price $price(psybnc)}
bind pub - $price(2) {price $price(eggdrop)}
bind pub - $price(3) {price $price(shell)}
bind pub - $price(4) {price $price(vhost)}
bind pub - $price(5) {price $price(plata)}
bind pub - $price(6) {price $price(contact)}
proc price {num nick uhost hand chan text} {
foreach haribo $num {
putmsg $chan "$haribo"
}
}
putlog "price loaded"
P.S. Nu am avut timp sa implementez flood protect, pentru bugs sau cereri postati aici,
__________________
Owner of #ro-tcl Last edited by Kurupt; 16-11-2006 at 19:50. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Comenzi BOT | oxyg3n | a&a light script | 10 | 28-04-2006 09:45 |
| ma intereseaza niste comenzi | solitare | #a&a | 1 | 26-01-2005 17:12 |
| public comenzi cu nickul botului ca prefix si semnele in fata comenzilor | Kurupt | Tcl scripting | 9 | 04-08-2004 03:15 |