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 

Basic on text/join scripts and abit more advanced request

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


Joined: 01 Jan 2008
Posts: 10

PostPosted: Tue Jan 01, 2008 11:59 am    Post subject: Basic on text/join scripts and abit more advanced request Reply with quote

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


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Tue Jan 01, 2008 6:45 pm    Post subject: Reply with quote

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


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

PostPosted: Tue Jan 01, 2008 7:02 pm    Post subject: Reply with quote

toXip: rssnews.tcl
_________________
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
toXiP
Voice


Joined: 01 Jan 2008
Posts: 10

PostPosted: Tue Jan 01, 2008 10:09 pm    Post subject: Reply with quote

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


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

PostPosted: Tue Jan 01, 2008 10:23 pm    Post subject: Reply with quote

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


Joined: 18 Mar 2003
Posts: 1452
Location: Norway

PostPosted: Wed Jan 02, 2008 6:52 am    Post subject: Reply with quote

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


Joined: 01 Jan 2008
Posts: 10

PostPosted: Wed Jan 02, 2008 7:44 am    Post subject: Reply with quote

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". Smile

What about my other request? Or maybe it's to much work?
Back to top
View user's profile Send private message
raider2k
Op


Joined: 01 Jan 2008
Posts: 140

PostPosted: Wed Jan 02, 2008 10:48 am    Post subject: Reply with quote

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


Joined: 20 Jan 2005
Posts: 31

PostPosted: Wed Jan 02, 2008 12:11 pm    Post subject: Reply with quote

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
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