|
|
 |
 |
 |
 |
register |
bbs |
search |
rss |
faq |
about
|
 |
 |
meet up |
add to del.icio.us |
digg it
|
 |
 |
| Technophiliacs & Technophiles The Technophiliacs forum is for discussing any and all forms of tech and other types of social backwardness. Including discussions of strange home-brewed hardware technology. Where to get good tools. How to make fiberglass molds. Computer hardware and software technolgy, including operating systems, applications, networking, hardware, CPU's, disk drives, and other geeky things. Viruses and Artificial Life discussions. How to write HTML. End user tools discussions and support issues. Gating the Internet with other nets. |
 |
|
|
#1
 2002-07-21, 23:00
|
|
Forum Administrator
|
|
Columbus Ohio
|
|
irc scripting
hrm i have been at this one for a while but with the irc command /dns you can get an ip return on somebodies dns (duh) so i was working with mirc a bit and i decided to make a remote script with this for my bot. i was using the following: ON 1:TEXT: dns*:#:{ if ($2 == dns) { dns $3- } }
it didnt like that much, it kept displaying the results in the status window. so then i went on some dalnet channel asking about this and somebody gave me the following bit of scripting: on 1 :DNS:{ if ($iaddress) { echo -a $nick $+ 's Mask $chr(40) $+ $+ $naddress $+ $+ $chr(41) resolved to $iaddress } else { echo -a $nick $chr(40) $+ $+ $naddress $+ $+ $chr(41) could $chr(2) $+ NOT $+ $chr(2) be resolved } }
this did not like me much either. can anybody tell me how to go about doing this?
[This message has been edited by Zok (edited 07-21-2002).]
|
|
#2
 2002-07-22, 06:37
|
soullace 
Regular
|
|
|
|
Re: irc scripting
Easy read your help file. Here is the related script.
on 1 :DNS:{ var %n = $dns(0) echo 4 Found %n addresses while (%n > 0) { echo 4 dns: $dns(%n) nick: $dns(%n).nick addr: $dns(%n).addr ip: $dns(%n).ip dec %n } }
I think you can figure it out.
[This message has been edited by soullace (edited 07-22-2002).]
|
|
#3
 2002-07-22, 07:08
|
|
Forum Administrator
|
|
Columbus Ohio
|
|
Re: irc scripting
well would this work best as a remote, alias, or a stand alone script?
|
|
#4
 2002-07-22, 07:10
|
soullace 
Regular
|
|
|
|
Re: irc scripting
it has to be done as a remote.
the $dns variable (identifier) is only valid within the "on DNS" remote.
|
|
#5
 2002-07-23, 03:19
|
|
Forum Administrator
|
|
Columbus Ohio
|
|
Re: irc scripting
kick ass, thanks man. how does this look: code:
ON 10:TEXT:Zokbot, dns*:#:{ if ($2 == dns) { dns $3- } } on 1 :DNS:/msg #Zok Resolved: $raddress on 1 :DNS:{ var %n = $dns(0) echo 4 Found %n addresses while (%n > 0) { echo 4 dns: $dns(%n) nick: $dns(%n).nick addr: $dns(%n).addr ip: $dns(%n).ip dec %n } }
[This message has been edited by Zok (edited 07-23-2002).]
|
|
#6
 2002-07-24, 04:30
|
soullace 
Regular
|
|
|
|
Re: irc scripting
Looks good, you might want to record a %chan variable to be the channel the bot outputs the message into. If you wanted to you could set it in the on TEXT event. %chan = $chan, that way it can send the message to the channel that requested the DNS in the first place. code:
ON 10:TEXT:Zokbot, dns*:#:{ if ($2 == dns) { %chan = $chan dns $3- } } on 1 :DNS:/msg %chan Resolved: $raddress ;also you probally want these to send to the ;channel and not echo. on 1 :DNS:{ var %n = $dns(0) /msg %chan Found %n addresses while (%n > 0) { /msg %chan dns: $dns(%n) nick: $dns(%n).nick addr: $dns(%n).addr ip: $dns(%n).ip dec %n } }
But what do i know about what you want it to do? Anyways those are some ideas. [This message has been edited by soullace (edited 07-24-2002).]
|
|
#7
 2002-07-24, 04:58
|
|
Forum Administrator
|
|
Columbus Ohio
|
|
Re: irc scripting
damn, that helped even more. thanks. **gives soullace props**
|
|
#8
 2002-07-25, 08:00
|
soullace 
Regular
|
|
|
|
Re: irc scripting
no problem if you want an explaination i can do that too. I still can't believe i remember this shit, its been over 6 years since i've scripted in that horrible language :]
|
|
#9
 2002-07-25, 16:09
|
|
Forum Administrator
|
|
Columbus Ohio
|
|
Re: irc scripting
does the script even have a name asside from mirc script?
|
|
#10
 2002-07-28, 19:29
|
|
Forum Administrator
|
|
Columbus Ohio
|
|
Re: irc scripting
ok dispite it not having a name i still have one last quest. Is there any possible way to make a script/alias which will automaticly capitalize the first letter of every sentence and/or put a period at the end? i have been looking for about a week now and cant find it, all i find is bigass scripts and shit to go with them (none of which helps).
|
|
#11
 2002-07-31, 08:21
|
soullace 
Regular
|
|
|
|
Re: irc scripting
"does the script even have a name asside from mirc script?" Nope, it's just mirc script. "Is there any possible way to make a script/alias which will automaticly capitalize the first letter of every sentence and/or put a period...." Well yes and no. It is possible to trap messages and format them. It is however not possible to supress mirc from printing the message before you have a chance to print it all formatted. Here is a script to show you what i mean. code:
on 1:TEXT:*:*: { %text = $right($1-, $calc($len($1-) - 1)) %l = $upper($left($1, 1))
echo -a < $+ $nick $+ > %l $+ %text $+ .
halt ;does jack shit since we are called after mirc prints }
Anyways thats something.
|
|
 |
 |
To the best of our knowledge, the text on this page may be freely reproduced and distributed.

totse.com certificate signatures
|
 |
 |
About | Community | Bad Ideas | Drugs | Ego | Erotica | Fringe | Society | Technology
|
 |
 |
 |
 |
|
|