This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Help for those learning Tcl or writing their own scripts.
Raiden
Voice
Posts: 7 Joined: Thu Jan 05, 2006 8:00 am
Post
by Raiden » Thu Jan 05, 2006 8:09 am
Code: Select all
on 1:text:*!ekle*:#zurnaops,#zurna: {
if $nick isop #zurna {
if $2 ison #zurnaops { halt }
if $2 ison #zurna && !$ulist($2,666,1) {
auser 666 $2
msg #zurnaops 4 $2 2 $nick 7Tarafından Eklendi.
mode #zurna +b $2 | kick #zurna $2 4Lütfen Nick Değiştiriniz. 12Staff Zurna Team
}
else {
msg #zurnaops $2 daha önceden listede mevcut yada #zurna kanalında yok.
}
}
}
on 1:text:*!sil*:#zurnaops,#zurna: {
if $nick isop #zurna {
if $ulist($2,666,1) {
ruser 666 $2
msg #zurnaops 4 $2 2Çıkarıldı
}
else {
msg #zurnaops $2 Listede Yok
}
}
}
on @666:join:#zurna: {
if $nick ison #zurnaops && $nick == $me { halt }
else { mode #zurna +b $nick | kick #zurna $nick 4Lütfen Nick Değiştiriniz. 12Staff Zurna Team }
}
i did some like this but it's not runing true.
Code: Select all
bind pub - !ekle kekle
bind pub - !sil ksil
proc kekle {nick mask hand chan text} {
if {[onchan $nick "#raiden"]} {
set dosya [open "bad.txt" a]
puts $dosya $text
close $dosya
putserv "PRIVMSG Raiden :$text eklendi ekleyen $nick"
putserv "mode $chan +b text"
putserv "kick $chan $text 4Kanalda Cinsellik İçeren Nicklerin Kullanımı Yasaktır. Lütfen Nick Değiştiriniz. Bu Nickler:2 Cam-Lez-Gay 4vs. 2 Bot Writed: 4Raiden"
}
}
proc ksil {nick mask hand chan text} {
if {[onchan $nick "raiden"]} {
set dosya [open "bad.txt" r]
set nicks ""
while { ![eof $dosya] } {
if { ![string equal -nocase [gets $dosya] [lindex [split $text] 0]] } {
lappend nicks [gets $dosya]
}
}
close $dosya
set dosya [open "bad.txt" w]
foreach i $nicks {
puts $dosya $i
}
close $dosya
putserv "PRIVMSG Raiden :$text Çıkarıldı"
}
}
pls help..
Last edited by
Raiden on Thu Jan 05, 2006 12:19 pm, edited 2 times in total.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Jan 05, 2006 9:03 am
This belongs in the "Scripting help" forum.
What's wrong? What do you want to do?
Raiden
Voice
Posts: 7 Joined: Thu Jan 05, 2006 8:00 am
Post
by Raiden » Thu Jan 05, 2006 12:20 pm
how can i convert this mirc script to tcl ?
T-Xorcist
Halfop
Posts: 47 Joined: Mon Nov 14, 2005 6:36 pm
Location: Netherlands
Contact:
Post
by T-Xorcist » Thu Jan 05, 2006 12:25 pm
You need to re-script it to TCL?
There is no tool that converts mirc to tcl..
Raiden
Voice
Posts: 7 Joined: Thu Jan 05, 2006 8:00 am
Post
by Raiden » Thu Jan 05, 2006 12:40 pm
I would like to have the tlc of the mirc script mentioned above
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Jan 05, 2006 1:14 pm
I know you want to convert it to Tcl, I asked you what's wrong with the Tcl you've wrote? Is there any errors or is there something you don't know how to write in Tcl?
Raiden
Voice
Posts: 7 Joined: Thu Jan 05, 2006 8:00 am
Post
by Raiden » Thu Jan 05, 2006 1:26 pm
i need badnick.tcl but
!add nick // write to bad.txt
!del nick // remove bad.txt
nick is join bot on chan bot is to look bad.txt if nick to existent, ban+kick
sorry, i dont very speak english
Raiden
Voice
Posts: 7 Joined: Thu Jan 05, 2006 8:00 am
Post
by Raiden » Thu Jan 05, 2006 1:46 pm
it should not add any nicks or delete the nicks in the bad nick text that are added with when '!delete' is said. And when the person with and in the bad nick text (list) they shoud be automatically banned from the channel
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Jan 05, 2006 8:12 pm
Code: Select all
bind pub n !add add:bnick
bind pub n !delete del:bnick
set bnicks [split [read [set file [open "scripts/bnicks.txt"]]] \n][close $file]
unset file
proc add:bnick {n u h c a} {
global bnicks
if {[lsearch -exact $bnicks [set b [string tolower [lindex [split $a] 0]]]] == -1} {
lappend bnicks $b
puthelp "NOTICE $n :Added $b to bad nicks list."
save:bnick
} {
puthelp "NOTICE $n :$b already exists in bad nicks list."
}
}
proc del:bnick {n u h c a} {
global bnicks
if {[set i [lsearch -exact $bnicks [set b [string tolower [lindex [split $a] 0]]]]] != -1} {
set bnicks [lreplace $bnicks $i $i]
puthelp "NOTICE $n :$b has been deleted from the bad nicks list."
save:bnick
} {
puthelp "NOTICE $n :$b does not exist in the bad nicks list."
}
}
proc save:bnick {} {
set a [open "scripts/bnicks.txt" w]
foreach bn $::bnicks {
puts $a $bn
}
close $a
}
The bad nicks list is $bnicks, the file is bnicks.txt located in scripts/ dir.
T-Xorcist
Halfop
Posts: 47 Joined: Mon Nov 14, 2005 6:36 pm
Location: Netherlands
Contact:
Post
by T-Xorcist » Fri Jan 06, 2006 12:02 am
You are so lucky with Sir_Fz
Raiden
Voice
Posts: 7 Joined: Thu Jan 05, 2006 8:00 am
Post
by Raiden » Sat Jan 07, 2006 5:45 am
very thanks
Raiden
Voice
Posts: 7 Joined: Thu Jan 05, 2006 8:00 am
Post
by Raiden » Sat Jan 07, 2006 9:34 am
not add
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Sat Jan 07, 2006 10:10 am
more than 2 words might help
Is there an error?