| View previous topic :: View next topic |
| Author |
Message |
darkfader Voice
Joined: 31 Dec 2005 Posts: 8
|
Posted: Sat Dec 31, 2005 1:23 pm Post subject: translate mirc to tcl |
|
|
can please someone translate it to tcl ohterwise i need to run a eggdrop and mirc bot
| Code: | 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 |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Sat Dec 31, 2005 1:37 pm Post subject: |
|
|
edit your post and paste the script again within [code] 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... |
|
| Back to top |
|
 |
darkfader Voice
Joined: 31 Dec 2005 Posts: 8
|
Posted: Sat Dec 31, 2005 1:42 pm Post subject: |
|
|
| De Kus wrote: | edit your post and paste the script again within [code] tags.
however this looks like an invite script, I am sure you will find a lot searching the TCL archives. |
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 |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Sat Dec 31, 2005 2:15 pm Post subject: |
|
|
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... |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Mon Jan 02, 2006 10:37 am Post subject: |
|
|
| Code: | 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  |
|
| Back to top |
|
 |
darkfader Voice
Joined: 31 Dec 2005 Posts: 8
|
Posted: Mon Jan 02, 2006 6:05 pm Post subject: only one lilte thing |
|
|
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 |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Mon Jan 02, 2006 7:07 pm Post subject: |
|
|
replace
| Code: | | [maskhost [getchanhost [lindex [split $text] 0]]] |
with
| Code: | | *!*@[lindex [split [getchanhost [lindex [split $text] 0]] @] 1] |
and
with
| Code: | | *!*@[lindex [split $host @] 1] |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Mon Jan 02, 2006 7:22 pm Post subject: Re: only one lilte thing |
|
|
| 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 |
|
| Back to top |
|
 |
darkfader Voice
Joined: 31 Dec 2005 Posts: 8
|
Posted: Mon Jan 02, 2006 7:37 pm Post subject: |
|
|
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???  |
|
| Back to top |
|
 |
|