egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

pls help mirc to tcl

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Raiden
Voice


Joined: 05 Jan 2006
Posts: 7

PostPosted: Thu Jan 05, 2006 8:09 am    Post subject: pls help mirc to tcl Reply with quote

Code:

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:


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
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Jan 05, 2006 9:03 am    Post subject: Reply with quote

This belongs in the "Scripting help" forum.

What's wrong? What do you want to do?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Raiden
Voice


Joined: 05 Jan 2006
Posts: 7

PostPosted: Thu Jan 05, 2006 12:20 pm    Post subject: Reply with quote

how can i convert this mirc script to tcl ?
Back to top
View user's profile Send private message
T-Xorcist
Halfop


Joined: 14 Nov 2005
Posts: 47
Location: Netherlands

PostPosted: Thu Jan 05, 2006 12:25 pm    Post subject: Reply with quote

You need to re-script it to TCL?

There is no tool that converts mirc to tcl..
_________________
is-1337.org IRC server!
Back to top
View user's profile Send private message Visit poster's website
Raiden
Voice


Joined: 05 Jan 2006
Posts: 7

PostPosted: Thu Jan 05, 2006 12:40 pm    Post subject: Reply with quote

I would like to have the tlc of the mirc script mentioned above
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Jan 05, 2006 1:14 pm    Post subject: Reply with quote

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?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Raiden
Voice


Joined: 05 Jan 2006
Posts: 7

PostPosted: Thu Jan 05, 2006 1:26 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Raiden
Voice


Joined: 05 Jan 2006
Posts: 7

PostPosted: Thu Jan 05, 2006 1:46 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Jan 05, 2006 8:12 pm    Post subject: Reply with quote

Code:
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.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
T-Xorcist
Halfop


Joined: 14 Nov 2005
Posts: 47
Location: Netherlands

PostPosted: Fri Jan 06, 2006 12:02 am    Post subject: Reply with quote

You are so lucky with Sir_Fz Laughing
_________________
is-1337.org IRC server!
Back to top
View user's profile Send private message Visit poster's website
Raiden
Voice


Joined: 05 Jan 2006
Posts: 7

PostPosted: Sat Jan 07, 2006 5:45 am    Post subject: Reply with quote

very thanks
Back to top
View user's profile Send private message
Raiden
Voice


Joined: 05 Jan 2006
Posts: 7

PostPosted: Sat Jan 07, 2006 9:34 am    Post subject: Reply with quote

not add Sad
Back to top
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Sat Jan 07, 2006 10:10 am    Post subject: Reply with quote

more than 2 words might help Rolling Eyes

Is there an error?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber