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.

translate mirc to tcl

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
d
darkfader
Voice
Posts: 8
Joined: Sat Dec 31, 2005 1:19 pm

translate mirc to tcl

Post by darkfader »

can please someone translate it to tcl ohterwise i need to run a eggdrop and mirc bot :roll:


Code: Select all

on *:text:!allow*:#avalon : {
  if ($nick isop $chan) {
    write invite.txt $address($2,2) 
    msg $chan 4 $2 is toegevoegd 12aan de lijst!
  }
}
on *:text:!invite:#avalon : {
  if ($nick ison #avalon.members) {
    notice $nick 4Je bent al op het 12members-kanaal.
  }
  else {
    if ($read(invite.txt,w,$address($nick,2)) != $null) {
      invite $nick #avalon.members
      msg $chan 4Invite geslaagd! 12Klik op het members-kanaal!
    }
    else {
      notice $nick Avalon's Member kanaal is dicht dus vraag ook niet om een invite. Blijf gerust in #avalon.
    }
  }
}
on *:text:!remove*:#avalon : {
  if ($nick isop $chan) {
    write -ds $+ $address($2,2) invite.txt
    msg $chan 4 $2 is verwijderd 12uit de lijst!
  }
}
Last edited by darkfader on Sat Dec 31, 2005 1:43 pm, edited 1 time in total.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

edit your post and paste the script again within

Code: Select all

 tags.
however this looks like an invite script, I am sure you will find a lot searching the TCL archives.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
d
darkfader
Voice
Posts: 8
Joined: Sat Dec 31, 2005 1:19 pm

Post by darkfader »

[quote="De Kus"]edit your post and paste the script again within

Code: Select all

 tags.
however this looks like an invite script, I am sure you will find a lot searching the TCL archives.[/quote]


oke i will edit the post it is a invite script but differnt like alle the scripts i have seen on eeg.org and other site this some works with pub commands and saves the ip of the user who you will add
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

Im not sure what you are triing to tell us. Are you looking for a script that invites users by *!*@IP instead of *!*ident@*.host ?
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Code: Select all

set db invite.txt
# Default place is in the eggdrop folder
bind PUB -|- !allow invite:allow
bind PUB -|- !remove invite:remove
bind PUB -|- !invite invite:doinv

proc invite:allow {nick host hand chan text} {
 if {[isop $nick $chan] && [string equal -nocase $chan "#avalon"] && [onchan [lindex [split $text] 0] $chan]} {
  # we put the host in the file (regardless if it's already in there.)
  set fs [open $::db a]; puts $fs "[maskhost [getchanhost [lindex [split $text] 0]]]"; close $fs
  putserv "NOTICE $nick :De host is toegevoegd."
 }
}

proc invite:remove {nick host hand chan text} {
 if {[isop $nick $chan] && [string equal -nocase $chan "#avalon"] && [onchan [lindex [split $text] 0] $chan]} {
  # we remove the host by a loop (i couldn't be bothered with anything else)
  set fs [open $::db r]; set hosts ""
  while {![eof $fs]} {
   if {![string equal -nocase [gets $fs] [maskhost [getchanhost [lindex [split $text] 0]]]]} {
    lappend hosts [gets $fs]
   }
  }
  close $fs;
  set fs [open $::db w]; foreach i $hosts { puts $fs $i }; close $fs
  putserv "NOTICE $nick :De host is verwijderd."
 }
}

proc invite:doinv {nick host hand chan text} {
 set fs [open $::db r]; set found 0
 while {![eof $fs]} {
  if {[string equal -nocase [gets $fs] [maskhost $host]]} {
   set found 1
  }
 }
 close $fs;
 if {$found} {
  putquick "INVITE $nick #avalon.members"
  putquick "NOTICE $nick :invite gelukt."
 } else {
  putserv "NOTICE $nick :Avalon's Member kanaal is dicht dus vraag ook niet om een invite. Blijf gerust in #avalon."
 }
}
This is completely untested, it might work, it might not :)
d
darkfader
Voice
Posts: 8
Joined: Sat Dec 31, 2005 1:19 pm

only one lilte thing

Post by darkfader »

The script works perfect only one liltte thing can that be fixed please

it save it like this

*!*POCT@*.barafranca.com

kan it be like the full adres

*!*@Huls.chat.barafranca.com

or

*!*~POCT@Huls.chat.barafranca.com


please this is a bug to need fixed
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

replace

Code: Select all

[maskhost [getchanhost [lindex [split $text] 0]]]
with

Code: Select all

*!*@[lindex [split [getchanhost [lindex [split $text] 0]] @] 1]
and

Code: Select all

[maskhost $host]
with

Code: Select all

*!*@[lindex [split $host @] 1]
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Re: only one lilte thing

Post by Alchera »

darkfader wrote:it save it like this

*!*POCT@*.barafranca.com

please this is a bug to need fixed
It is not a bug! That happens to be the normal method of setting. Try reading the manual.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
d
darkfader
Voice
Posts: 8
Joined: Sat Dec 31, 2005 1:19 pm

Post by darkfader »

just still little bug it save it like i wanted

*!*@jetje.chat.barafranca.com
*!*@cc76031-b.emmen1.dr.home.nl
*!*@ip51ce1eb7.speed.planet.nl
*!*@cc444674-a.haren1.gr.home.nl
*!*@c51472c74.cable.wanadoo.nl
*!*@lexje.chat.barafranca.com
*!*@i155153.upc-i.chello.nl
*!*@121-28.245.81.adsl.skynet.be
*!*@Inkiepink.chat.barafranca.com
*!*@cc858978-b.groni1.gr.home.nl


but when i say to remove a user on de list he will erase everyone in de invite list

why that happen??? :roll:
Post Reply