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 

translate mirc to tcl

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
darkfader
Voice


Joined: 31 Dec 2005
Posts: 8

PostPosted: Sat Dec 31, 2005 1:23 pm    Post subject: translate mirc to tcl Reply with quote

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



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
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Sat Dec 31, 2005 1:37 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
darkfader
Voice


Joined: 31 Dec 2005
Posts: 8

PostPosted: Sat Dec 31, 2005 1:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Sat Dec 31, 2005 2:15 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Mon Jan 02, 2006 10:37 am    Post subject: Reply with quote

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


Joined: 31 Dec 2005
Posts: 8

PostPosted: Mon Jan 02, 2006 6:05 pm    Post subject: only one lilte thing Reply with quote

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


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Jan 02, 2006 7:07 pm    Post subject: Reply with quote

replace
Code:
[maskhost [getchanhost [lindex [split $text] 0]]]

with
Code:
*!*@[lindex [split [getchanhost [lindex [split $text] 0]] @] 1]

and
Code:
[maskhost $host]

with
Code:
*!*@[lindex [split $host @] 1]

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Mon Jan 02, 2006 7:22 pm    Post subject: Re: only one lilte thing Reply with quote

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
View user's profile Send private message Visit poster's website
darkfader
Voice


Joined: 31 Dec 2005
Posts: 8

PostPosted: Mon Jan 02, 2006 7:37 pm    Post subject: Reply with quote

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??? Rolling Eyes
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 -> Script Requests 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