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.

pls help mirc to tcl

Help for those learning Tcl or writing their own scripts.
Post Reply
R
Raiden
Voice
Posts: 7
Joined: Thu Jan 05, 2006 8:00 am

pls help mirc to tcl

Post by Raiden »

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.
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

This belongs in the "Scripting help" forum.

What's wrong? What do you want to do?
R
Raiden
Voice
Posts: 7
Joined: Thu Jan 05, 2006 8:00 am

Post by Raiden »

how can i convert this mirc script to tcl ?
T
T-Xorcist
Halfop
Posts: 47
Joined: Mon Nov 14, 2005 6:36 pm
Location: Netherlands
Contact:

Post by T-Xorcist »

You need to re-script it to TCL?

There is no tool that converts mirc to tcl..
R
Raiden
Voice
Posts: 7
Joined: Thu Jan 05, 2006 8:00 am

Post by Raiden »

I would like to have the tlc of the mirc script mentioned above
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

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?
R
Raiden
Voice
Posts: 7
Joined: Thu Jan 05, 2006 8:00 am

Post by Raiden »

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
R
Raiden
Voice
Posts: 7
Joined: Thu Jan 05, 2006 8:00 am

Post by Raiden »

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
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

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
T-Xorcist
Halfop
Posts: 47
Joined: Mon Nov 14, 2005 6:36 pm
Location: Netherlands
Contact:

Post by T-Xorcist »

You are so lucky with Sir_Fz :lol:
R
Raiden
Voice
Posts: 7
Joined: Thu Jan 05, 2006 8:00 am

Post by Raiden »

very thanks
R
Raiden
Voice
Posts: 7
Joined: Thu Jan 05, 2006 8:00 am

Post by Raiden »

not add :(
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

more than 2 words might help :roll:

Is there an error?
Post Reply