| View previous topic :: View next topic |
| Author |
Message |
toXiP Voice
Joined: 01 Jan 2008 Posts: 10
|
Posted: Tue Jan 01, 2008 11:59 am Post subject: Basic on text/join scripts and abit more advanced request |
|
|
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: | on *:JOIN:#Channel1: {
if ($nick isop #Channel2) { mode # +o $nick }
} |
| Code: | 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:
| Quote: | <user1> !last
<eggdrop> Last News: <title> <writer> <date> |
- !News -> Show numbers of news, ex:
| Quote: | <user1> !news
<eggdrop> We have posted XX news. |
- !Search -> Search through news, ex:
| Quote: | <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! |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Tue Jan 01, 2008 6:45 pm Post subject: |
|
|
| 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/ ) |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Jan 01, 2008 7:02 pm Post subject: |
|
|
toXip: rssnews.tcl _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
toXiP Voice
Joined: 01 Jan 2008 Posts: 10
|
Posted: Tue Jan 01, 2008 10:09 pm Post subject: |
|
|
| 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? |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Jan 01, 2008 10:23 pm Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Wed Jan 02, 2008 6:52 am Post subject: |
|
|
| 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  _________________ Have you ever read "The Manual"? |
|
| Back to top |
|
 |
toXiP Voice
Joined: 01 Jan 2008 Posts: 10
|
Posted: Wed Jan 02, 2008 7:44 am Post subject: |
|
|
| 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  | 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? |
|
| Back to top |
|
 |
raider2k Op
Joined: 01 Jan 2008 Posts: 140
|
Posted: Wed Jan 02, 2008 10:48 am Post subject: |
|
|
| Quote: |
1.
[code]
on *:JOIN:#Channel1: {
if ($nick isop #Channel2) { mode # +o $nick }
}
[/code
|
the first one should go like this:
[code]
bind join - * onjoin
proc { nick uhost handle chan } {
if { [$nick isop "#channel"] } {
pushmode $chan +o $nick
}
}
[/code]
for
| Quote: |
[code]
on *:TEXT:*:#Channel1: {
if (text1 isin $1-) { msg # $2- $+ : Text2! }
}
[/code]
|
I would say we go for this one:
[code]
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
}
}
[/code]
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. |
|
| Back to top |
|
 |
tsukeh Voice
Joined: 20 Jan 2005 Posts: 31
|
Posted: Wed Jan 02, 2008 12:11 pm Post subject: |
|
|
raider2k, your code contains ~5 errors and/or misunderstanding..
These should work:
| Code: |
bind join - "#Channel1 *" foo:join
proc foo:join {nick uhost hand chan} {
if [isop $nick #Channel2] { pushmode $chan +o $nick }
}
|
| Code: |
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!" }
}
|
|
|
| Back to top |
|
 |
|