WhoIs Dialog

By FreeHuman on Oct 27, 2011

That Is Dialog Of /whois command
Again Write /whois nick and you will see the whois dialog
The IP Adress,Modes Is For The IRCOPS.Some Time Host Can Show The IPadress of nick
Auth is For GameSurge.Reg is for Check the nick is registered nick or no
And HelpOp Shows The NickName is HelpOp or no

#whois on
dialog whois {
  title "Whois"
  size -1 -1 131 113
  option dbu
  text "NickName:", 1, 4 4 27 8
  text "RealName:", 2, 4 13 25 8
  text "Identy:", 3, 4 22 25 8
  text "Host:", 4, 4 31 25 8
  text "IP Address:", 21, 4 40 31 8
  text "Auth or Reg:", 20, 4 58 31 8
  text "Channels:", 5, 4 67 25 8
  text "Away:", 6, 4 76 25 8
  text "Idle:", 24, 4 85 25 8
  text "Other:", 7, 4 94 32 8
  text "Modes:", 22, 4 49 31 8
  text "HelpOp:", 23, 4 103 32 8
  edit "", 8, 36 3 94 9, read autohs
  edit "", 9, 36 12 94 9, read autohs
  edit "", 10, 36 21 94 9, read autohs
  edit "", 11, 36 30 94 9, read autohs
  edit "", 12, 36 66 94 9, read autohs
  edit "", 13, 36 75 94 9, read autohs
  edit "", 14, 36 84 94 9, read autohs
  edit "", 15, 36 93 94 9, read autohs
  edit "", 16, 36 57 94 9, read autohs
  edit "", 17, 36 39 94 9, read autohs
  edit "", 18, 36 48 94 9, read autohs
  edit "", 19, 36 102 94 9, read autohs
}

raw *:*: {
  if ( $numeric == 311 ) {
    set %d $2
    dialog -m %d whois
    dialog -t %d Whois $2 $+ ?
    did -a %d 8 $2
    did -a %d 9 $6-
    did -a %d 10 $3
    did -a %d 11 $4
    halt
  }
  if ( $numeric == 307 ) {
    if ( a registered nick isin $1- ) {
      did -a %d 16 Yes
      halt
    }
  }
  if ( $numeric == 378 ) {
    did -a %d 17 $6-
    halt
  }
  if ( $numeric == 379 ) {
    did -a %d 18 $6-
    halt
  }
  if ( $numeric == 330 ) {
    did -a %d 16 $3
    halt
  } 
  if ( $numeric == 319 ) {
    did -a %d 12 $3-
    halt
  }
  if ( $numeric == 301 ) { 
    did -a %d 13 $3-
    halt
  }
  if ( $numeric == 313 ) {
    did -a %d 15 $3-
    did -a %d 7 $2
    halt
  }
  if ( $numeric == 317 ) {
    did -a %d 14 $duration($3)
    halt
  }
  if ( $numeric == 310 ) {
    if ( help isin $1- ) {
      did -a %d 19 Yes
      halt
    }
  }
  if ( $numeric == 318 ) {
    halt
  }
  if ( $numeric == 312 ) { halt }
}
#whois end

menu * { 
  Whois Dialog
  .$iif($group(#whois).status == on,$style(1)) ON: .enable #whois | linesep | echo 3 -ag * Whois Dialog Has Been Enabled | linesep
  .$iif($group(#whois).status == off,$style(1)) OFF: .disable #whois | linesep | echo 2 -ag * Whois Dialog Has Been Disabled | linesep
}

Comments

Sign in to comment.
Jethro   -  Nov 08, 2011

Please explain what you mean by "fully use isin?" You have said it in a masterful way feasible. Please do share your knowledge, or perhaps a isin tutorial to benefit the public. I'll be waiting for your boastful claims, Mr. know it all.

 Respond  
sera   -  Nov 08, 2011

Must be time to break out the juice box and the yoghurt.

 Respond  
  -  Nov 08, 2011

I do not feel you have any room to say what is appropriate use, as you did not even know how to fully use isin. I think it would be the place of someone who knows the full use of the commands to say such not people that do not know how to use isin fully. besides the appropriate way is to break each raw up and halt each one. there for you way is less appropriate by your standers as well, along with Deans and many other ways you could do this. you can stand your ground and be redundant all you wish. Tho may I add have you fully test this to prove its not the best for this use? as I only seen you say any thing bad about using it. every one else seems not to have a problem

 Respond  
Jethro   -  Nov 08, 2011

I wouldn't use isin the way you have it, and frankly it's seldom to see people use it in that fashion. It doesn't matter it works correctly. isin has its convenience and downfalls and is generally considered less appropriate in your example. I stand my ground.

 Respond  
  -  Nov 08, 2011

Oh whinny now, for being told that you should test and be certain before you say something wont work. Need your bottle and diaper changed, that would be embarrassing you for my ego, and trolling. the other was stating a fact.

jaytea has a life besides here, as well he most likely was giving you the chance to correct your own mistake (just my thought, he will need to say why), but seeing as you set your mind closed and

If you don't believe me, ask someone experienced in MSL, and he or she'll tell you what you have shown is incorrect.

corrected you. You did asked for a more experienced MSL coder, your got it and now upset that it did not go the way you thought it would, and as jaytea pointed out if (a isin happy laughing mad sad) it will return true, do not try to claim it will not work to the desire want. it works correctly and have not had any errors using this ever.

I am not picking on you I am asking you and any one else that you always test before posting what I post wont work. I test any thing I post before posting it, cuz I know it will be ripped apart. I learned that lesson with the whole captacha fight.

 Respond  
Jethro   -  Nov 08, 2011

Is it necessary to embarrass another person to boost your own ego too, MakiMaki? I'm only human and could have commented on something with a misunderstanding, not to mention the isin with multiple strings has never been deemed rather "usual" in MSL. Go ahead and use isin everywhere in your scripts. The match is and will always be prevalent, resulting in potential false positive. jaytea, and I don't know why he waited this long to make a post, came out of nowhere to correct this matter just in time. You basically take this opportunity to troll on this thread for your own enjoyment, along with me as a main target. Perhaps jaytea likes to see this happen too...I don't know. You tell me.

 Respond  
Stewie1k94   -  Nov 08, 2011

Nice

 Respond  
  -  Nov 08, 2011

Jethro
MakiMaki,
Quote:
if ($numeric isin 312 318) { halt }
will only check the first condition, that being the 312 to be compared. 318 will be overlooked. If you don't believe me, ask someone experienced in MSL, and he or she'll tell you what you have shown is incorrect.

What you're looking for is this:
Code:
if ($numeric isin 312) || ($numeric isin 318) { halt }
While isin will work but still not considered proper as Dean mentioned.

Your latest example is deemed correct, and it'll work as shown.

I am so happy that the proper way was deemed correct by you, however in your rush your ego has made you look rather silly. I think it prudent that you test first before saying something I post wont work, it may not always be the best code, but it will work. So please test what I post before you say it wont work, I use 7.22 and will upgrade as updates come out, for any one wishing to challenge any code I post be sure to test it first in that.
Clearly in this case you did not test, nor knew about this enough to be correcting any one.

Proper way

raw 312:*: { halt }
raw 318:*: { halt }

My Way

if ($numeric isin 312 318) { halt }
 Respond  
jaytea   -  Nov 08, 2011

Jethro, a = tom mary jay bob, b = $1-, and the same extremely simple rule as earlier ("if b contains a at any position") still stands. nothing else is happening.

 Respond  
Jethro   -  Nov 08, 2011

But that makes the match very prevalent with the isin operator.

 Respond  
extremity   -  Nov 08, 2011

more like

if alpha isin a b c d e f g h i j k .. returns true

if 005 isin 001 002 003 004 005 .. returns true

I use this in all my scripts.

 Respond  
Jethro   -  Nov 08, 2011

So, are you suggesting you can add as many strings as you like with the isin? As in:

if (tom mary jay bob isin $1-)

But that won't match them individually...will it?

 Respond  
jaytea   -  Nov 07, 2011
if (a isin b)

checks if the string 'b' contains the substring 'a' at any position. 318 is not 'overlooked'.

$numeric = 1 or 2, which are sent when you first connect to an IRC server, will satisfy the condition too, so it matches more than it should.

 Respond  
Jethro   -  Nov 07, 2011

MakiMaki, > if ($numeric isin 312 318) { halt }will only check the first condition, that being the 312 to be compared. 318 will be overlooked. If you don't believe me, ask someone experienced in MSL, and he or she'll tell you what you have shown is incorrect.

What you're looking for is this:

if ($numeric isin 312) || ($numeric isin 318) { halt }

While isin will work but still not considered proper as Dean mentioned.

Your latest example is deemed correct, and it'll work as shown.

 Respond  
  -  Nov 07, 2011

MakiMaki, that won't work. You can only use the isin operator to make one single comparison.

Scakk's suggestion makes the recommended approach. You can also combine them with the && operator:
Code:
if ($numeric == 318) && ($numeric == 312) { halt }
You can, however, use the $count():
Code:
if ($count($numeric,312,318)) { halt }
in place of the isin, but isin is not considered appropriate.

I made sure what I posted worked thank you Jethro
and do please tell us all on what is considered appropriate,
I believe the proper way would be.

raw 312:*: { halt }
raw 318:*: { halt }

Deans method works, as does mine.

 Respond  
_Dean_   -  Nov 07, 2011

as Jethro have said, $count was not made to check such kind of thing, since it will work, but its not properly for that...
in my first post i showed the simple way of including a lot of other raws using $istok

if ($istok(312 318,$numeric,32)) {

using MakiMaki method you can use it for a range of raws like

if ($numeric isnum 312-318) { halt }

just a simple example

 Respond  
Jethro   -  Nov 07, 2011

MakiMaki, that won't work. You can only use the isin operator to make one single comparison.

Scakk's suggestion makes the recommended approach. You can also combine them with the && operator:

if ($numeric == 318) && ($numeric == 312) { halt }

You can, however, use the $count():

if ($count($numeric,312,318)) { halt }

in place of the isin, but isin is not considered appropriate.

 Respond  
  -  Nov 07, 2011

this will work as well

if ($numeric isin 312 318)  { halt }
 Respond  
Scakk   -  Nov 01, 2011

For ones like this

  if ( $numeric == 318 ) {
    halt
  }
  if ( $numeric == 312 ) { halt }

you can use ( extra numbers can be added just remember to leave a space between each one )

 if ($istok(312 318,$numeric,32)) { halt }
 Respond  
FreeHuman   -  Nov 01, 2011

Script Has Been Changed.Added New Modes,HelpOp.Test Again

 Respond  
FreeHuman   -  Nov 01, 2011

WorldDMT
hi

Quote:
text "IP Address:", 20, 4 40 31 8

u can get his IP??
Is You Are IRCOp,you can see the his/her IP address

 Respond  
WorldDMT   -  Oct 31, 2011

hi

text "IP Address:", 20, 4 40 31 8

u can get his IP??

 Respond  
  -  Oct 29, 2011
Stewie1k94   -  Oct 29, 2011

I never came to protect anyone, i was just saying it how it was! And some of them non sense posts will be yours Dean

 Respond  
Jethro   -  Oct 29, 2011

lol A troll calls another person a troll. Isn't that ironically ridiculous and stupid? Yes, MakiMaki. I know exactly what I'm doing. I know I can ignore him, but I can't stand the way he treats others like crap, acting arrogant for his own enjoyment.

 Respond  
_Dean_   -  Oct 29, 2011

MakiMaki as you saw, Jethro aka silly boy, just came here to troll the post, without even post something that can helps
FreeHuman on his code... and then his e-gf aka toclafane1 came here to protect him, and they said i started...

FreeHuman please if possible, delete all non-sense posts and no one will go crazy if you do it, trust me

 Respond  
  -  Oct 29, 2011

FreeHuman Wrote:

Hey Dean ,I Changed My Snippet.Test My Whois Dialog Again.

hmmm?

seems to me the poster was happy with the feedback Dean gave to him, and either does not know how to delete your comments, or does not want to be attacked him self for deleting your guys carry on of crap. as we all know you will carry on like crazy over some one deleting your disrespectful crap. and no I don't see dean being rude till you guys pushed it.. tho shame on him he let you two get him going and looking just as bad, but even more shameful on your part, Not one of your comment on this thread was needed toclafane1, Jethro is a big boy and can fight his own battles he does not need you to fight for him, Jethro you know better, and to carry this crap on is truly, disappointing, you and Dean both do not need to act like kids your both should be role models to the newer msl scripters.

 Respond  
Jethro   -  Oct 29, 2011

I think MakiMaki was being sarcastic, because he used the word "lame" and "was not rude," in his sentence, where not rude equals rude. lol

 Respond  
Stewie1k94   -  Oct 29, 2011

Dean Wrote: > i will not respect a trash like you, put yourself in your own place If that is not rude, then i don't want to know what rude is. Also

Dean Wrote: > and im not being like you asking ppl to change their codes I believe he started it.

 Respond  
  -  Oct 29, 2011

Nice work FreeHuman

Nice Job helping Dean, I saw the points you made and it seems FreeHuman, saw them as well.

How lame that Dean was making effort to help someone and was not being rude to them and the kiddie fights startup.

 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.