Address/Host Script

By mitch21236 on Aug 16, 2010

When Someone Says !address in a channel or in a pm it gives the address of $2 () in a pm. Really simple script once again.

on *:TEXT:!address *:*:{
  msg $nick $address($2,0) is $nick 's hostmask
}

;i need to type more for this to send xD dont copy this part

Comments

Sign in to comment.
Jethro   -  Aug 17, 2010

lol Lucius, that was a hypocritical mistake. This time I truly give up on that thread. There will be endless pain to ever make another comment to that post. They are bunch of trolls and will try anything to bring their post to the public attention badly.

Oh WorldDMT, you've reiterated mitch's mistake found by me and napa initially. :p For the identifier $2, you don't need a space or $+, simply use > $2's

 Respond  
WorldDMT   -  Aug 17, 2010

who need it he can //echo -a $address(NickNameHere,0)

about

msg $nick $address($2,0) is $nick 's hostmask

if i type !address napa
result in PM => *!napa@host_of_napa is WorldDMT 's hostmask

may be this must be

msg $nick $address($2,0) is $2 's hostmask
 Respond  
Lucius   -  Aug 17, 2010

I wasn't indicating you as a fighter, but implicating those who fight with other users every chance they get. They flame under their threads to get attention. They're so called attention-getters and trolls, which are a pain in the neck..

And yet you keep going back to Renegade-IRC pic thread?
LOL
:D

btw: Keep at it mitch21236 I know napa's edits usually look like a foreign language but eventually it will click. (it took a year of lazy self teaching to get a hint for me lol)

 Respond  
Cheiron   -  Aug 17, 2010

Hi mitch

gonna give you a code Jethro_ did for me based on this which i wanted a long time ago. its a compex way of doing it but it will help you learn a bit more on coding styles based on what you are doing :)
place it in a clean blank remotes window on the bot.
then to use...

in any channel ... just simply type whoid

and the bot shall deliver (note my command is slightly different and shows in channel not pm)

idshow Cheiron -irc.sassirc.com- *** Titan_Bot (main@xxx.xxx.xxx.xxx) did a /whois on you. Cheiron's whois ID: ~Looking@ServicesAdmin.SassIRC.com and Real Name is: Why
raw 311:*: {
  .msg #YourChannel $2 $+ 's ID is: $+($3,@,$4) and Real Name is: $6- | halt
}
on *:TEXT:*:#: {
  if ($nick isop $chan) && ($regex($1-,/(^|\s)(whoid?d?s?\s\S+)/i)) {
    tokenize 32 $regml(2) | whois $2
  }
}

note.. this one is an ops only rank for use. to edit for your purpose
change isop to ison and .msg #yourchannel to .msg $nick

hope this will help with your coding and learning :)

 Respond  
Jethro   -  Aug 17, 2010

I wasn't indicating you as a fighter, but implicating those who fight with other users every chance they get. They flame under their threads to get attention. They're so called attention-getters and trolls, which are a pain in the neck...

 Respond  
mitch21236   -  Aug 16, 2010

i aint gonna fight with you ppl, im just trying to get myself familiar with msl. if you want to help teach me, go to #wto on irc.collectiveirc.net

 Respond  
Jethro   -  Aug 16, 2010

Smart people know how to take "harsh but constuctive comments" as an incentive to improve themselves. The dumb ones just keep fighting back...

 Respond  
napa182   -  Aug 16, 2010

true but thats better then just saying USELESS!!! ;x

 Respond  
Aucun50   -  Aug 16, 2010

If I do recall napa you have made more then a few harash comments yourself, only differance is you told them why.

 Respond  
napa182   -  Aug 16, 2010

WorldDMT Said:

USELESS!!!

um a bit harsh don't you think WorldDMT...
I mean why even bother making a comment...
it may be useless to most of us, but the person posting it seems to have a use for it.

Keep at it mitch21236 don't let comments like that discourage you from msl.

 Respond  
Jethro   -  Aug 16, 2010

lol WorldDMT. I remember you misspelled the word "useless" as "unless" before...:P

 Respond  
WorldDMT   -  Aug 16, 2010

USELESS!!!

 Respond  
napa182   -  Aug 16, 2010

also the thing about using $address() is that if the person has been idle it wont show.
all you get is > is so-an-so's hostmask

it would prob be better to use a /who nick then use the raw to get the addy

I think it's raw 352 for the addy line then haltdef raw 315, but raws do
vary from server to server.

 Respond  
Jethro   -  Aug 16, 2010

it started as a !myaddress scripta snippet like that will be useless. People can find out by entering:

//echo -a $address(mitch21236,0)

Think about it. Make a relay snippet to mainly report the address of the client that runs it? It's not worth it.

 Respond  
mitch21236   -  Aug 16, 2010

my bad about the $nick thing that was just a stupid mistake i wasnt thinking, it started as a !myaddress script

 Respond  
Jethro   -  Aug 16, 2010

$nick is the person who triggers the script. You were supposed to use $2 instead. A little trigger protection is needed so the client that runs the code doesn't get spammed:

on *:text:*:*:{
  tokenize 32 $strip($1-)
  if ($1 == !address) && (!%f) && ($2 ison #) { 
    inc -u3 %f | msg $iif(#,#,$nick) $address($2,0) is $2's hostmask.
  }
}

If you're gonna use * instead of the # in your text event, you should use $iif(#,#,$nick) to make it work for either the channel or PM. And as napa said, it's best you strip out control codes.

 Respond  
napa182   -  Aug 16, 2010

=/

um you should check if $2 is said by using $$2 and if $$2 is a nick
also what if the user typed the command in color?
change $nick 's to $$2,s
before you post a snippet try an think of everything that can go wrong with it, and add the right error checks.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.