Imposter script

By slub77 on Dec 21, 2009

Very easy to use:

commands:
Saddhost
Sallhost
Shost

paste in to remotes

Updated: Woops sorry guys need not make it var %name and %cname so it shouted each time fixed that now :/

EDIT: dialog and fixed alot of bugs :)

on *:TEXT:!address*:#:msg $chan $address($2,$3)

on *:TEXT:saddhost*:#:{
  if $2 ison $chan {
    writeini hosts.ini host  $address($2,1) $2
    notice $nick 4,2 Added $2 to the host list  
  } 
  else { notice $nick $2 aint here }
}

on *:TEXT:shost*:#:{
  if $2 ison $chan {
    if !$readini(hosts.ini, host, $address($2,1)) { notice $nick $2 has not had a host saved }
    else { notice $nick $2 hostname was saved as : $readini(hosts.ini, host, $address($2,1)) }
  }
  else { notice $nick $2 aint here }
}

on *:JOIN:#:{
  if (!$readini(hosts.ini, host, $address($nick,1))) && ( $right($nick,3) !isnum ) { writeini hosts.ini host $address($nick,1) $nick } 
  elseif ($nick isin $readini(hosts.ini, host, $address($nick,1))) { halt }
  elseif ($address($nick,1) isin $address($me,2)) { halt }
  elseif (!$address($nick,1)) { halt }
  elseif ($right($nick,1) isnum ) { halt }
  elseif $remove($nick,_,),() isin $readini(hosts.ini, host, $address($nick,1)) && $len($nick) <= 3 { halt }
  else {
    var %name $readini(hosts.ini, host, $address($nick,1)) | var %cname $nick
    if %name iswm %cname { halt }
    else { msg $chan @IMPOSTER@ Name is: $readini(hosts.ini, host, $address($nick,1)) | noop $tip(Imposter,Imposter $nick, $readini(hosts.ini, host, $address($nick,1))) } 
  }
}

dialog imp {
  title Imposters
  size -1 -1 208 118
  option dbu
  list 1, 3 15 100 50
  list 2, 3 65 100 50
  edit ,3, 105 70 90 10, disable
  Button Change, 4, 105 80 30 20
  edit Address, 5, 105 60 90 10
}

menu * {
  $iif(# !isin $active,$style(2)) Imposter:/dialog -ma imp imp
}

on *:DIALOG:imp:init:*:{
  $imp
}

on *:DIALOG:imp:SCLICK:*:{
  if $did == 2 { var %name $did(2,0).seltext | did -o $dname 3 1 Real name is: $readini(hosts.ini, host, $address($did(2,0).seltext,1)) | did -o $dname 5 1 $adcheck  }
  if $did == 4 { $iif(# !isin $active,dialog -x imp imp) | var %name $did(2,0).seltext | writeini hosts.ini host $address(%name,1) %name | $reset }
}
alias imp {
  var %a 1 | var %b $nick($active,0) 
  :loop
  if %a == %b { noop }
  else {
    if $nick($active,%a) isin $readini(hosts.ini, host, $address($nick($active,%a),1)) { did -i $dname 1 $calc($did(1).lines +1 ) $nick($active,%a) | inc %a | goto loop }
    else { did -i $dname 2 $calc($did(2).lines +1) $nick($active,%a) | inc %a | goto loop }
  }
}

alias adcheck {
  if $address($did(2,0).seltext,1) { return (1) $mask($address($did(2,0).seltext,1),1) }
  if $address($did(2,0).seltext,2) { return (2) $mask($address($did(2,0).seltext,2),1) }
  if $address($did(2,0).seltext,3) { return (3) $mask($address($did(2,0).seltext,3),1) }
  if $address($did(2,0).seltext,4) { return (4) $mask($address($did(2,0).seltext,4),1) }
  if $address($did(2,0).seltext,5) { return (5) $mask($address($did(2,0).seltext,5),1) }
  if $address($did(2,0).seltext,6) { return (6) $mask($address($did(2,0).seltext,6),1) }
  if $address($did(2,0).seltext,7) { return (7) $mask($address($did(2,0).seltext,7),1) }
  if $address($did(2,0).seltext,8) { return (8) $mask($address($did(2,0).seltext,8),1) }
  if $address($did(2,0).seltext,9) { return (9) $mask($address($did(2,0).seltext,9),1) }
  else { .whois $did(2,0).seltext }

}
.whois $nick($active,%a) |
else { .whois $did(2,0).seltext }

alias -l nday {
  if $day == monday { return Tuesday }
  if $day == tuesday { return Wnedsday }
  if $day == wnedsday { return Thursday }
  if $day == thursday { return Friday }
  if $day == friday { return Saturday }
  if $day == Saturday { return Sunday }
  if $day == sunday { return Monday }
  else { noop }
}

on *:text:sallhost:#:{
  set %numbers $calc($nick($chan,0,a) + 1 )
  set %x 1

  :names
  set %names $nick($chan,%x)

  if %x = %numbers { notice $nick done }
  else {

    if $readini(hosts.ini, host, $address(%names,1)) { 
      inc %x 1
      goto names 
    }
    else { 
      writeini hosts.ini host $address(%names,1) %names
      notice $nick added %names
      inc %x 1
      goto names
    }
  }
}

Comments

Sign in to comment.
slub77   -  Mar 05, 2010

@minicruzer lol, so u mean like ur shell's ip changed etc, lol armature
@jethro_ it is what you talking about lol

 Respond  
Jethro   -  Mar 04, 2010

How come this one is not dialog'd? lol I'm busting your chops, slub77. :p

 Respond  
miniCruzer   -  Mar 04, 2010

The only "tricks" you have go as far as mIRC

 Respond  
slub77   -  Feb 13, 2010

and so do i, you should know that by now ;)

 Respond  
miniCruzer   -  Feb 13, 2010

No, but I have tricks up my sleeve if you all decide to try anything. :P

 Respond  
slub77   -  Feb 13, 2010

wow u sound angry 0.0

 Respond  
miniCruzer   -  Feb 13, 2010

Like I care. I can get in if I want to.

 Respond  
slub77   -  Feb 12, 2010

well that's ur fault :P

 Respond  
miniCruzer   -  Feb 11, 2010

Nah, I know who this is. I'm lamered from the chat this was used in.

 Respond  
slub77   -  Feb 10, 2010

??????????????????????

 Respond  
Jethro   -  Feb 09, 2010

Deja vu?

 Respond  
miniCruzer   -  Feb 09, 2010

Hmm, where have I seen this before??

 Respond  
slub77   -  Dec 22, 2009

dam i ain't set it to var, crap the original one was but there was a problem so i set it to "set" so i could see what was happening thanks

 Respond  
Jethro   -  Dec 21, 2009

If I were you, I'd do it with hash tables for a script like this. The combination of goto and while loop is redundant. A local var should also suffice.

 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.