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.

Basic on text/join scripts and abit more advanced request

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
t
toXiP
Voice
Posts: 10
Joined: Tue Jan 01, 2008 11:00 am

Basic on text/join scripts and abit more advanced request

Post by toXiP »

I am all new to TCL, but I got some experience with mIRC scripts. I was wondering if someone could tell me how theese mIRC scripts would look like in TCL?

Code: Select all

on *:JOIN:#Channel1: {
if ($nick isop #Channel2) { mode # +o $nick }
}

Code: Select all

on *:TEXT:*:#Channel1: {
if (text1 isin $1-) { msg # $2- $+ : Text2! }
}
Also, I would make a request for scripts that can:
- !last -> Show the last added news (on a page), ex:
<user1> !last
<eggdrop> Last News: <title> <writer> <date>
- !News -> Show numbers of news, ex:
<user1> !news
<eggdrop> We have posted XX news.
- !Search -> Search through news, ex:
<user1> !search cat
<eggdrop> Result: News found! <urltonews>
<user1> !search dog
<eggdrop> Result: News not found!
It would be great with help from you guys!
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

We don't do mirc-2-tcl here. Since you're already familiar with mirc scripting, tcl's logic should be pretty simple, so refer to your tcl & eggdrop documentation (particularly the tcl-commands.doc that comes with eggdrop, and http://tcl.tk/man/tcl8.4/TclCmd/ )
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
t
toXiP
Voice
Posts: 10
Joined: Tue Jan 01, 2008 11:00 am

Post by toXiP »

I thought you could help me with so simple mirc-to-tcl. And Alchera, how could a this rss-script help me here? Does it have a "!last"-cmd?
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

toXiP wrote:I thought you could help me with so simple mirc-to-tcl.
We don't do mIRC "script" conversions simply because we know only Tcl.

The Tcl Archive is a good place to start looking for what you wish (read the sticky topics as well); also use the Search function.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

toXiP wrote:I thought you could help me with so simple mirc-to-tcl.
If you explain what the mIRC "code" does, we might be a little more helpful :wink:
Have you ever read "The Manual"?
t
toXiP
Voice
Posts: 10
Joined: Tue Jan 01, 2008 11:00 am

Post by toXiP »

user wrote:
toXiP wrote:I thought you could help me with so simple mirc-to-tcl.
If you explain what the mIRC "code" does, we might be a little more helpful :wink:
Oh okay.

first: if the user that joins #channel1 has op on #channel2, I wan't to give the user op at #channel1.

Second: if someone says text1 on #channel1, I wan't to msg text2 to the chan. And "$2- $+ :" means that if someone says text1 <nick>, then i'll msg "<nick>: text2". :-)

What about my other request? Or maybe it's to much work?
r
raider2k
Op
Posts: 140
Joined: Tue Jan 01, 2008 10:42 am

Post by raider2k »

1.

Code: Select all

on *:JOIN:#Channel1: { 
if ($nick isop #Channel2) { mode # +o $nick } 
}
[/code
[/quote]

the first one should go like this:

[code]
bind join - * onjoin
proc { nick uhost handle chan } {
      if { [$nick isop "#channel"] } {
                pushmode $chan +o $nick
      }
}
for

Code: Select all

on *:TEXT:*:#Channel1: { 
if (text1 isin $1-) { msg # $2- $+ : Text2! } 
}
I would say we go for this one:

Code: Select all

bind pubm - * autocatchproc
proc autocatchproc { nick uhost handle chan text } {
    if { [string equal -nocase $text "*text1*"] && [string equal $chan "#chan1"] } {
        putserv "PRIVMSG #CHAN2 :$nick: text2
     }
}
These scripts might not be working in the first place ... I said might ^^
Im not sure though about the "isop" thingie. Usually they are self-explaining but well .. ask if you still have question toXiP.
t
tsukeh
Voice
Posts: 31
Joined: Thu Jan 20, 2005 6:22 am

Post by tsukeh »

raider2k, your code contains ~5 errors and/or misunderstanding..

These should work:

Code: Select all

bind join - "#Channel1 *" foo:join
proc foo:join {nick uhost hand chan} {
 if [isop $nick #Channel2] { pushmode $chan +o $nick }
}

Code: Select all

bind pubm - "#Channel1 *" foo:pubm
proc foo:pubm {nick uhost hand chan text} {
 if [string match -nocase "*text1*" $text] { putserv "PRIVMSG $chan :[join [lrange [split $text] 1 end]]: Text2!" }
}
Post Reply