| Author | Post |
Topic: Binds (Binds working?) Forum: eggdrop › help Goto post |
Mirage  | 04-04-2007, 18:18 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| The bind pubm binds will not work as their mask is matched against "#channel text". You might want to use bind pub.  |
 |
Topic: Help with Converting (mIRC to TCL) Forum: eggdrop › help Goto post |
Mirage  | 04-04-2007, 17:12 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| Quote by McFly: ok, so im trying to convert my mIRC scripts to TCL. Lucky me. Anyways, i was wondering if anyone knew what to do with something like this
on *:TEXT:!opme:#: {
if ($istok(Cheshire.AermBot, $nick, 46)) { /cs aop # add $nick | /mode $chan +o $nick
}
}
Appreciate the help.
| 1 | bind pub - "!opme" pub:opme | | 2 | | | 3 | proc pub:opme { nick uhost hand chan text } { | | 4 | if { ?$istok(Cheshire.AermBot, $nick, 46)? } { | | 5 | ?/cs aop # add $nick? | | 6 | pushmode $chan +o $nick | | 7 | } | | 8 | } |
I have no idea what $istok(Cheshire.AermBot, $nick, 46) or /cs aop # add $nick do, so i can not help you with these two.  |
 |
Topic: Problem mit der sc.tcl (Datei kann nicht gefunden werden -.-) Forum: work › imminent problem solving Goto post |
Mirage  | 10-16-2006, 11:38 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| Und der Windrop kann auch mit Slash arbeiten anstatt Backslash?  |
This post was edited 1 times, last on 10-16-2006, 11:41 by Mirage
|
 |
Topic: Problem with news script (Bot will send msg only if are any changes on website.. but how to do it?) Forum: work › imminent problem solving Goto post |
Mirage  | 01-19-2006, 17:49 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| Describe your problem, please.  |
 |
Topic: Test Forum: #tcl › smalltalk Goto post |
Mirage  | 08-29-2005, 22:21 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| ui 8)  |
 |
Topic: Look for a string in a textfile Forum: work › imminent problem solving Goto post |
Mirage  | 06-23-2005, 21:19 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| | 1 | proc getmodel { string } { | | 2 | set file [open carnames.txt r] | | 3 | set result "" | | 4 | set num 0 | | 5 | while {![eof $file]} { | | 6 | gets $fs line | | 7 | if {[string match *[b]string[/b]* $line]} { | | 8 | append result "$line " | | 9 | incr num | | 10 | } | | 11 | } | | 12 | close $file | | 13 | return "$num $result" | | 14 | } |
Returns: "<number of results> <result 1> <result2> ... <resultx>"  |
This post was edited 2 times, last on 12-02-2005, 23:09 by CyBex
|
 |
Topic: xChat + Python Plugin Forum: work › imminent problem solving Goto post |
Mirage  | 03-20-2005, 18:26 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| Eggdrop Scripts kannst du ausschließlich mit Eggdrops benutzen.  |
 |
Topic: xChat + Python Plugin Forum: work › imminent problem solving Goto post |
Mirage  | 03-20-2005, 12:13 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| Es sind die Scripts für X-Chat geeignet, die auch dafür geschrieben wurden.
Da sieht man entweder an den benutzten Kommandos, denn die unterscheiden sich zwichen Eggdrop und X-Chat, oder man entnimmt das etwaiger Beschreibungen. Wenn man Scripts z.B. von egghelp.org herunterlädt, kann man auch davon ausgehen, dass es für Eggdrops ist.  |
 |
Topic: xChat + Python Plugin Forum: work › imminent problem solving Goto post |
Mirage  | 03-19-2005, 23:28 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| Das ist ein TCL Script für Eggdrops, nicht für X-Chat.  |
 |
Topic: xChat + Python Plugin Forum: work › imminent problem solving Goto post |
Mirage  | 03-19-2005, 14:19 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| Davon ist wohl auszugehen.  |
 |
Topic: xChat + Python Plugin Forum: work › imminent problem solving Goto post |
Mirage  | 03-18-2005, 13:54 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| ActiveTCL installieren und bei der X-Chat Installation das TCL Plugin aktivieren.  |
 |
Topic: xChat + Python Plugin Forum: work › imminent problem solving Goto post |
Mirage  | 03-17-2005, 19:22 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| Wieso python? Das TCL Plugin wird dir wohl eher helfen :|  |
 |
Topic: Problem mit queue script Forum: work › imminent problem solving Goto post |
Mirage  | 03-16-2005, 16:39 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
|  |
 |
Topic: Problem mit queue script Forum: work › imminent problem solving Goto post |
Mirage  | 03-11-2005, 13:36 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
|  |
 |
Topic: Happy New Year Forum: #tcl › smalltalk Goto post |
Mirage  | 01-01-2005, 00:21 | Happy New Year | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| | 1 | . | | 2 | | | | 3 | \ * ./ | | 4 | . * * * . | | 5 | -=* POP! *=- | | 6 | . .* * * . | | 7 | / * .\ | | 8 | | | | 9 | . | | 10 | _ _ | | 11 | ( ) ( ) | | 12 | | |_| | _ _ _ _ _ _ _ _ | | 13 | | _ | /'_` )( '_`\ ( '_`\ ( ) ( ) | | 14 | | | | |( (_[u]| || ([/u]_) )| (_) )| (_) | | | 15 | (_) (_)`\__,_)| ,__/'| ,__/'`\__, | | | 16 | | | | | ( )_| | | | 17 | (_) (_) `\___/' | | 18 | _ _ _ _ | | 19 | ( ) ( ) ( ) ( ) | | 20 | | `\| | __ _ _ _ `\`\_/'/'__ _ _ _ __ | | 21 | | , ` | /'__`\( ) ( ) ( ) `\ /'/'__`\ /'_` )( '__) | | 22 | | |`\ |( ___/| \_/ \_/ | | |( ___/( (_| || | | | 23 | (_) (_)`\____)`\___x___/' (_)`\____)`\__,_)(_) | | 24 | | | 25 | __ __ __ _____ | | 26 | /'__`\ /' _`\ /' _`\ ( '___) | | 27 | (_) ) )| ( ) || ( ) || |__ | | 28 | / '/ | | | || | | |(,__ \ | | 29 | /' /( )| (_) || (_) | __ / / | | 30 | (_____/'`\___/'`\___/'(____/' | | 31 | . | | 32 | | | | 33 | \ * ./ | | 34 | . * * * . | | 35 | -=* POP! *=- | | 36 | . .* * * . | | 37 | / * .\ | | 38 | | | | 39 | . |
 |
 |
Topic: Netsplit erkennen Forum: work › imminent problem solving Goto post |
Mirage  | 12-29-2004, 17:15 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| Mit
| 1 | bind sign - * sign:netsplit | | 2 | proc sign:netsplit { nick uhost hand chan reason } { | | 3 | if {$reason == "*.net *.split"} { | | 4 | putlog "netsplit detected" | | 5 | } | | 6 | } |
kannst du einen Netsplit (QuakeNet) erkennen. Wie du dein Script letztendlich deaktivierst, müsstest du selber wissen.  |
 |
Topic: Need help wiff script Forum: work › imminent problem solving Goto post |
Mirage  | 11-10-2004, 22:03 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| For now, i can't see any mistakes. Will try tomorrow.
Good night,  |
 |
Topic: Ban exempt script not matching properly Forum: work › imminent problem solving Goto post |
Mirage  | 10-03-2004, 19:03 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| | 1 | set lbm "*!*[string trimleft [lindex [split $uhost "@"] 0] "~"]@[lindex [split [maskhost $uhost] "@"] 1]"@"] 1]" |
-> | 1 | set lbm "*!*[string trimleft [lindex [split $uhost "@"] 0] "~"]@[lindex [split [maskhost $uhost] "@"] 1]" |
You had something twice at the end. "@"] 1]  |
 |
Topic: webseiten auslesen Forum: work › imminent problem solving Goto post |
Mirage  | 10-01-2004, 18:04 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| *hust* ja, korrekt  |
 |
Topic: webseiten auslesen Forum: work › imminent problem solving Goto post |
Mirage  | 10-01-2004, 15:09 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| split arbeitet mit \n, wenn man kein anderes Zeichen angibt.  |
 |
Topic: webseiten auslesen Forum: work › imminent problem solving Goto post |
Mirage  | 09-27-2004, 15:09 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| Die Antwort befindet sich ein Forum weiter unten.
$data kannst du dann in eine Liste konvertieren und anschließend mit lindex die erste und zweite zeile ausgeben.
| 1 | set data [split $data] | | 2 | puthelp "PRIVMSG $channel :[lindex $data 0] [lindex $data 1]" |
 |
 |
Topic: Ban exempt script not matching properly Forum: work › imminent problem solving Goto post |
Mirage  | 09-12-2004, 22:30 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| You're right, i forgot that one.  |
 |
Topic: Ban exempt script not matching properly Forum: work › imminent problem solving Goto post |
Mirage  | 09-08-2004, 14:39 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| That should do it (im using the voiceclientmasks variable you set in your script here):
| 1 | #this creates a partyline command ".checkvoice <channel>" | | 2 | bind dcc n "checkvoice" dcc:checkvoice | | 3 | | | 4 | proc dcc:checkvoice { handle idx text } { | | 5 | if {![validchan $text]} { | | 6 | putdcc $idx "Invalid channel $text" | | 7 | return 1 | | 8 | } | | 9 | foreach user [chanlist $text] { | | 10 | if {![isvoice $user $text]} { | | 11 | foreach voiceclientmask [split $voiceclientmasks] { | | 12 | if {[string match -nocase $voiceclientmask [getchanhost $user $text]]} { | | 13 | set found 1 | | 14 | break | | 15 | } | | 16 | } | | 17 | if {$found} { | | 18 | pushmode $text +v $user | | 19 | unset found | | 20 | } | | 21 | } | | 22 | } | | 23 | } |
If it's not working, let me know  |
 |
Topic: Ban exempt script not matching properly Forum: work › imminent problem solving Goto post |
Mirage  | 09-06-2004, 22:35 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| No, you have to change the FIRST one
| 1 | foreach banmask [split [string tolower $lamerbanmasks] "\n "] { |
Go, read some tutorials about foreach   |
 |
Topic: Ban exempt script not matching properly Forum: work › imminent problem solving Goto post |
Mirage  | 09-06-2004, 20:02 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| | 1 | foreach lamerbanmasks [split [string tolower $lamerbanmasks] "\n "] { |
That's a part which will NOT work, as this would overwrite the global variable lamerbanmasks with the first list element of itself. You have to use another name for the first lamerbanmasks.
So. ..that's what i found in a rush  |
 |
Topic: (ger) bind time - "?0 * * * *" advertise Forum: work › imminent problem solving Goto post |
Mirage  | 09-06-2004, 16:23 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| | 1 | bind time - "00 *" advertise | | 2 | proc advertise { minute hour day month year } { | | 3 | # wenn das ergebnis "stunde durch 2" das gleiche ist wie das ergebnis "integer von stunde durch 2" ist die zahl gerade | | 4 | # somit sind 2 stunden vergangen und es soll geworben werden | | 5 | if {[expr $hour/2.] == [expr int($hour/2)]} { | | 6 | do advertise | | 7 | # ansonsten eben nicht (den else teil kannst du auch weglassen) | | 8 | } else { | | 9 | don't advertise | | 10 | } | | 11 | } |
Statt do advertise und don't advertise setzt du halt einfach die gewünchten befehle ein  |
 |
Topic: (ger) bind time - "?0 * * * *" advertise Forum: work › imminent problem solving Goto post |
Mirage  | 09-05-2004, 13:40 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| | 1 | bind time - "00 *" advertise | | 2 | proc advertise { minute hour day month year } { | | 3 | if {[expr $hour/2.] == [expr int($hour/2)]} { | | 4 | do advertise | | 5 | } else { | | 6 | don't advertise | | 7 | } | | 8 | } |
 |
 |
Topic: [TCL] Getting the source code of a web site Forum: #tcl › code snippets Goto post |
Mirage  | 08-27-2004, 15:52 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| Note that putcmdlog is a TCL command of Eggdrop.  |
 |
Topic: Role of this forum Forum: work › script announcements Goto post |
Mirage  | 06-01-2004, 15:34 | Role of this forum | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| This forum is made to allow you opening YOUR WORKING scripts to the public.
To do this, simply create a new thread, put a short, significant description into the subject and a detailed one in the message. After all, append a link to your script.
This forum is not for requesting help!  |
 |
Topic: Hi can some1 help me!? Forum: work › imminent problem solving Goto post |
Mirage  | 05-26-2004, 19:53 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| You need to put the | 1 | utimer 6 "channel remove $joinchan" |
into the else clause where | 1 | putserv "PRIVMSG #eggdrop.intern :\002$rnick\002 requested \002$rname\002 for \002$joinchan\002. Request \002denied\002." |
is.
By the way, see http://www.peterre.com/characters.html and check your script for wrong code which is described there  |
 |
Topic: warscript whats wrong :S Forum: work › imminent problem solving Goto post |
Mirage  | 05-23-2004, 12:04 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| What's the matter with the second one?  |
 |
Topic: [TCL] Getting the source code of a web site Forum: #tcl › code snippets Goto post |
Mirage  | 05-19-2004, 17:23 | [TCL] Getting the source code of a web site | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| This is how to get source code of web site. The following script snippet requires the HTTP package (which is included in TCL 8.0 and any later version).
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
|
# load the http package
package require http
# send the http request, -timeout sets up a timeout to occur after the specified number of milliseconds, we use catch to avoid an abort of the script in case of an error when executing http::geturl (e.g. due to an unsupported url)
if {[catch { set token [http::geturl http://yourhost.com -timeout 3000]} error] == 1} {
puts stdout "$error"
return
# check if the request was successful, if yes -> put the html source code into $data
} elseif {[http::status $token] == "ok"} {
set data [http::data $token]
# if a timeout has occurred, send "Timeout occured" to the standad output device
} elseif {[http::status $token] == "timeout"} {
puts stdout "Timeout occurred"
# send the error to the standard output device if there is one
} elseif {[http::status $token] == "error"} {
puts stdout [http::error $token]
}
# last but not least, release the memory which was used for these operations
http::cleanup $token
|
 |
This post was edited 2 times, last on 08-14-2009, 03:22 by thommey
|
 |
Topic: [EGG] bind Forum: #tcl › code snippets Goto post |
Mirage  | 03-31-2004, 17:30 | Public binds | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| Public binds
1. possibility
| 1 | bind pub <flags> <command> <proc> |
Flags: What flags must a user have on the Bot to trigger that bind?
- or -|- = no flags needed
n = global owner
-|n = channel owner
n|n = global owner OR channel owner
n&n = global owner AND channel owner
m|n = global master OR channel owner
You can replace the "n" and "m" with what ever flag you want.
Command: The first word the user writes in his line is the command. So if someone says "Hey guys" in the channel and the command is "Hey" the bind is triggered and the specific procedure called.
Proc: The procedure that should be called when the bind is triggered
Call the procedure "greet" when someone says "Hello" on any channel the bot is on:
| 1 | bind pub - "hello" greet |
We can write "hello" as the command because l
etter case doesn't matter in binds
Example trigger: Someuser ( Someuser!user@coolhost.us) writes "hello world!" on channel "#we.learn.tcl" and is known as "Beginner" by the Bot.
Example procedure header for the greet:
| 1 | proc greet { nick uhost handle channel text } { |
So regarding the example trigger the following content would be in the following variables ($variable - content):
$nick - Someuser
$uhost - user@coolhost.us
$handle - Beginner
$channel - #we.learn.tcl
$text - world! (everything after the command)
2. possibility
Whenever you want to check more than the first word of a line or if you want to use wildcards you have to use the bind type PUBM
| 1 | bind pubm <flags> <mask> <proc> |
Flags: as aforementioned
Mask: The mask is a bit different to command parameter in the bind type pub. It is matched against the channel the user said something on and the text he had written. Means: "#channel text". Examples beneath.
Proc: as aforementioned
Ok. Let's make the procedure "greet" being called when users write something with an @ in the channel #we.learn.tcl.
| 1 | bind pubm - "#we.learn.tcl *@*" greet |
Or making the channel name regardless:
| 1 | bind pubm - "% *@*" greet |
% = wildcard for "one word"
Example trigger (matches for both binds): Someuser ( Someuser!user@coolhost.us) writes "write to me: cooluser@someisp.org" on channel "#we.learn.tcl" and is known as "Beginner" by the Bot.
Example procedure header:
| 1 | proc greet { nick uhost hand chan arg } { |
Regarding the example trigger the variables will get the following content:
$nick - Someuser
$uhost - user@coolhost.us
$hand - Beginner
$chan - #we.learn.tcl
$arg - write to me: cooluser@someisp.org (the first word is not stripped like when it is called by a pub bind, the 5th argument contents the whole line here)
As you can see you can name the variables as you want (but be careful with using the name "args" for 5th argument - this has a special meaning). Only the order of the content is always the same and you always have to provide 5 variable names for those two bind types.
I hope this will help you making your first public binds.  |
 |
Topic: Test Forum: #tcl › smalltalk Goto post |
Mirage  | 01-31-2004, 00:49 | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| *zzZzzzZ* Good night!
EDIT:dont click on edit, dont, DONT, DONT!!!!.. damn, too late //never  |
 |
Topic: Test Forum: #tcl › smalltalk Goto post |
Mirage  | 01-26-2004, 20:46 | Test | |
Staff (Moderator) Member since 01/2004 54 Posts Location: Zwickau, Germany
| :| fish go moo :|  |