Advertisement
Guest User

Untitled

a guest
May 11th, 2017
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.11 KB | None | 0 0
  1. ; / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \
  2. ; | Wyrm's mIRC Scripts - Guest Identifier Script |
  3. ; | Automatic name detection from hostnames, including with automatic database construction |
  4. ; \ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /
  5.  
  6. ; To add any channel use /wms.guestid.setup WC [PUB]
  7. ; In any channel you want added, where:
  8. ; WC is the wildcard pattern you wish to match against (*guest* will likely be most useful)
  9. ; Giving any second argument will make announcements about the identity of the new person public (ie messages the channel instead of using echo)
  10.  
  11. ALIAS wms.guestid.setup {
  12. if ($1 == $null) { echo 7 -a $timestamp 4You need to specify a wildcard to match the nicks against. | return }
  13. if ($2 != $null) {
  14. if (%wms.guestid.chanlist == $null) set %wms.guestid.chanlist [ # $+ : $+ [ $network ] $+ :pub: $+ [ $1 ] ]
  15. else set %wms.guestid.chanlist [ %wms.guestid.chanlist # $+ : $+ [ $network ] $+ :pub: $+ [ $1 ]] ]
  16. echo 7 -a $timestamp 4Added # on $network to list of channels. Will match7 $1 4against all nicks joining, and will announce publicly any known identities.
  17. }
  18. else {
  19. echo 7 -a $timestamp 4Added # on $network to list of channels. Will match7 $1 4against all nicks joining.
  20. if (%wms.guestid.chanlist == $null) set %wms.guestid.chanlist [ # $+ : $+ [ $network ] $+ :priv: $+ [ $1 ] ]
  21. else set %wms.guestid.chanlist [ %wms.guestid.chanlist # $+ : $+ [ $network ] $+ :priv: $+ [ $1 ] ]
  22. }
  23. if (%wms.guestid.database.1 == $null) set %wms.guestid.database.1
  24. }
  25. ALIAS wms.guestid.add {
  26. ;$1 name
  27. ;$2 ip
  28. ;$3 table number
  29. if (%wms.guestid.database. [ $+ [ $3 ] ] == $null) set %wms.guestid.database. [ $+ [ $3 ] ]
  30. if ($istok( %wms.guestid.database. [ $+ [ $3 ] ] , [ $2 ] $+ $chr(47) $+ [ $1 ] ,32)) noop
  31. if ($numtok(%wms.guestid.database. [ $+ [ $3 ] ] ,32) < 40) set %wms.guestid.database. [ $+ [ $3 ] ] %wms.guestid.database. [ $+ [ $3 ] ] [ $2 ] $+ $chr(47) $+ [ $1 ]
  32. else wms.guestid.add.recursive $1 $2 $calc( [ $3 ] +1 )
  33. }
  34. ALIAS wms.guestid.add.recursive wms.guestid.add $1-
  35. ALIAS wms.guestid.lookup {
  36. ;$1 host
  37. var %dbnum = 0
  38. var %num = 0
  39. var %nick
  40. var %nicklist
  41. while (%dbnum < $var(%wms.guestid.database.*,0)) {
  42. inc %dbnum
  43. var %n = $numtok(%wms.guestid.database. [ $+ [ %dbnum ] ] ,32)
  44. var %i = 1
  45. while (%i <= %n) {
  46. if ($gettok($gettok(%wms.guestid.database. [ $+ [ %dbnum ] ] ,%i,32),1,47) == $1) {
  47. %nick = $gettok($gettok(%wms.guestid.database. [ $+ [ %dbnum ] ] ,%i,32),2,47)
  48. %nicklist = %nicklist $gettok($gettok(%wms.guestid.database. [ $+ [ %dbnum ] ] ,%i,32),2,47)
  49. inc %num
  50. }
  51. inc %i
  52. }
  53. }
  54. %i = 1
  55. %n = $numtok(%nicklist,32)
  56. var %nicks
  57. while (%i < %n) {
  58. %nicks = %nicks $gettok(%nicklist,%i,32) $+ ,
  59. inc %i
  60. }
  61. %nicks = $left(%nicks,-1) or %nick
  62. if ($prop == num) return %num
  63. if ($prop == nick) return %nick
  64. if ($prop == nicks) return %nicks
  65. }
  66. ALIAS wms.guestid.ghost {
  67. var %n $nick($2,0)
  68. var %i = 1
  69. var %exists = $false
  70. var %nicklist,%nicks
  71. while (%i <= %n) {
  72. if (($3 != $nick($2,%i)) && ($address($nick($2,%i),2) == $1)) { %nicklist = %nicklist $nick($2,%i) | %exists = $true }
  73. inc %i
  74. }
  75. if ($numtok(%nicklist,32) < 2) %nicks = %nicklist
  76. else {
  77. %i = 1
  78. %n = $numtok(%nicklist,32)
  79. while (%i < %n) {
  80. %nicks = %nicks $gettok(%nicklist,%i,32) $+ ,
  81. inc %i
  82. }
  83. %nicks = $left(%nicks,-1) or %nick
  84. }
  85. if ($prop == exists) return %exists
  86. else return %nicks
  87. }
  88. on *:NICK: {
  89. var %n = $numtok(%wms.guestid.chanlist,32)
  90. var %i = 1
  91. var %chanlist
  92. var %net,%p,%wc
  93. while (%i <= %n) {
  94. %chanlist = $gettok(%wms.guestid.chanlist,%i,32)
  95. %net = $gettok(%chanlist,2,58)
  96. %p = $gettok(%chanlist,3,58)
  97. %wc = $gettok(%chanlist,4-,58)
  98. if (($network == %net) && (%wc iswm $nick)) {
  99. wms.guestid.add $newnick $address($newnick,2) 1
  100. break
  101. }
  102. inc %i
  103. }
  104. }
  105. on *:JOIN:#: {
  106. var %n = $numtok(%wms.guestid.chanlist,32)
  107. var %i = 1
  108. var %possibles
  109. var %chanlist
  110. var %chan,%net,%p,%wc
  111. while (%i <= %n) {
  112. %chanlist = $gettok(%wms.guestid.chanlist,%i,32)
  113. %chan = $gettok(%chanlist,1,58)
  114. %net = $gettok(%chanlist,2,58)
  115. %p = $gettok(%chanlist,3,58)
  116. %wc = $gettok(%chanlist,4-,58)
  117. if ((# == %chan) && ($network == %net) && (%wc iswm $nick)) {
  118. %possibles = %possibles %chanlist
  119. }
  120. inc %i
  121. }
  122. if (%possibles == $null) return
  123. %i = 1
  124. %n = $numtok(%possibles,32)
  125. while (%i <= %n) {
  126. if (%p != $gettok($gettok(%possibles,%i,32),3,58)) {
  127. echo 4 # $timestamp Name matches both private and public wildcards! Using private to be safe.
  128. %p = priv
  129. break
  130. }
  131. inc %i
  132. }
  133. var %num = $wms.guestid.lookup($address($nick,2)).num
  134. var %str
  135. if (%num == 0) {
  136. if ($wms.guestid.ghost($address($nick,2),#,$nick).exists) {
  137. %str = 7That's $wms.guestid.ghost($address($nick,2),#,$nick) pissing about with another connection...
  138. }
  139. else %str = 7nfi who that is, will work it out when they reveal themselves!
  140. }
  141. else if (%num == 1) %str = 7That's $wms.guestid.lookup($address($nick,2)).nick $+ !
  142. else if (%num > 1) %str = 7That's $wms.guestid.lookup($address($nick,2)).nicks $+ !
  143. if (%p == something itll never be) {
  144. msg # %str
  145. scon 1 echo -gt line 146 id script throws error! % str is: %str
  146. }
  147. else echo 4 # $timestamp %str
  148. }
  149. ALIAS wms.guestid.upgrade {
  150. var %i = 1
  151. var %both
  152. var %nick
  153. var %addy
  154. if (%wms.guestid.database.1 == $null) %wms.guestid.database.1 *!*@EE60ABB5.7B6FE80C.3F13CD5B.IP/Wyrm *!*@synIRC-B3BFDB14.star.bris.ac.uk/FistOFun *!*@235CBFA6.F64FD24B.EA659B29.IP/charky *!*@synIRC-26A6276.bethere.co.uk/BattlePope *!*@synIRC-8B98ED03.cable.ubr07.aztw.blueyonder.co.uk/Loweko *!*@318D7C44.AA4DD6D2.F76ABBC2.IP/BSR *!*@EBE01352.B13C9085.948414C0.IP/charky *!*@synIRC-F286FE5F.sotn.cable.ntl.com/helloteam *!*@synIRC-5DFD14F1.star.bris.ac.uk/FistOFun *!*@synIRC-9FD74795.terminal.tdcmobil.dk/Flare *!*@synIRC-C55A1863.terminal.tdcmobil.dk/Flare *!*@synIRC-BD57D80C.terminal.tdcmobil.dk/Flare *!*@synIRC-705AB44F.gly.bris.ac.uk/mayflower *!*@synIRC-2F5733D7.terminal.tdcmobil.dk/Flare *!*@synIRC-386DEFAC.terminal.tdcmobil.dk/Flare *!*@synIRC-F2305B8.terminal.tdcmobil.dk/Flare *!*@synIRC-5064C915.terminal.tdcmobil.dk/Flare *!*@synIRC-15996E13.gly.bris.ac.uk/mayflower *!*@synIRC-B10029DA.terminal.tdcmobil.dk/Flare *!*@synIRC-CB7E7382.terminal.tdcmobil.dk/Flare *!*@synIRC-C02402F0.range86-161.btcentralplus.com/GTatHome *!*@synIRC-F286FE5F.sotn.cable.ntl.com/charky *!*@synIRC-E72D3704.range86-166.btcentralplus.com/GTatHome *!*@synIRC-524A0DED.dsl.pipex.com/Fake-Face *!*@43E919A7.B9739DD4.63637687.IP/charky *!*@5C2D4DAA.966B9AF9.3A885D3D.IP/charky *!*@synIRC-2A71911B.onyx.net/Scruffy *!*@8D1E998B.1202EF88.63637687.IP/charky *!*@700F7013.37C27BE5.59A2944A.IP/charky *!*@56877763.ADA29DF8.67028D06.IP/charky *!*@synIRC-E562B659.range86-177.btcentralplus.com/GTatHome *!*@F5AC37FA.5AB823F4.14B23BC6.IP/Socaddict *!*@synIRC-E4AB2487.lns6-c12.dsl.pol.co.uk/joshiba *!*@6AE2138E.25B9A296.556045B1.IP/Sshhh *!*@E5C7F669.F0B3776B.C4687893.IP/Mitcian *!*@synIRC-BDA55CF8.zone4.bethere.co.uk/VenusDeLiz *!*@synIRC-4C671C31.co.uk/Amy *!*@synIRC-4C671C31.co.uk/IRConan *!*@synIRC-11FC378D.cs.york.ac.uk/Octothorpe *!*@synIRC-D173EAAE.resnet.bris.ac.uk/poacheR
  155. if (%wms.guestid.database.2 == $null) %wms.guestid.database.2 *!*@synIRC-45A3F7DE.resnet.bris.ac.uk/timesend *!*@synIRC-EC027C77.resnet.bris.ac.uk/POEcube *!*@C35947EB.A74803AE.948414C0.IP/charky *!*@1FEF5563.AB269114.D017A69.IP/jsk *!*@synIRC-7D8E1CFF.resnet.bris.ac.uk/fatal *!*@synIRC-7017369A.maths.bris.ac.uk/Havokroft *!*@synIRC-95122DE2.maths.bris.ac.uk/Havokroft *!*@synIRC-791A707.resnet.bris.ac.uk/EtherealOne *!*@synIRC-5225E19E.cable.ubr08.aztw.blueyonder.co.uk/Pretzel *!*@647BC5A7.6EAB7639.7BCD0AF8.IP/samurite *!*@synIRC-58934566.hor.ucl.ac.uk/reddd *!*@synIRC-D3E9D921.hor.ucl.ac.uk/Antoin *!*@B5CF7F89.5946AEA9.BBE3CF9A.IP/Caroline *!*@synIRC-1A275176.pcr.bris.ac.uk/Robbo *!*@synIRC-26A6276.bethere.co.uk/Pretzel *!*@synIRC-66A72F31.cable.ubr09.aztw.blueyonder.co.uk/DrRobotnick *!*@synIRC-FF307DDC.resnet.bris.ac.uk/Vity *!*@synIRC-60A5E2CC.resnet.bris.ac.uk/J *!*@synIRC-60A5E2CC.resnet.bris.ac.uk/fallen_hero *!*@40E69D8D.339ACB8E.C0C96999.IP/BattlePope *!*@synIRC-D788A49.ubu.bris.ac.uk/McG *!*@synIRC-6D95B0B7.cable.ubr08.wolv.blueyonder.co.uk/DrRobotnick *!*@synIRC-EDC1790A.cable.ubr12.aztw.blueyonder.co.uk/Moreta *!*@synIRC-C2534FCB.maths.bris.ac.uk/Havokroft *!*@synIRC-A5EFCBDF.cable.ubr04.mort.blueyonder.co.uk/Stupidolphin *!*@3BA8306D.854AD596.92E6D8B7.IP/Shazz *!*@synIRC-939C8C4E.bethere.co.uk/BraveSirRobbo *!*@synIRC-52F8EFEC.maths.bris.ac.uk/Uni-Face *!*@synIRC-A5EFCBDF.cable.ubr04.mort.blueyonder.co.uk/stupidolhpin *!*@synIRC-632C8FB9.cable.ubr22.aztw.blueyonder.co.uk/Noodle *!*@synIRC-3A208346.range86-147.btcentralplus.com/Scooby *!*@synIRC-A807ABA7.resnet.bris.ac.uk/hOZ *!*@synIRC-C113095A.resnet.bris.ac.uk/Molubdos *!*@synIRC-EDE59596.maths.bris.ac.uk/Havokroft *!*@synIRC-C385CDB.maths.bris.ac.uk/Havokroft *!*@synIRC-68D7AB9.resnet.bris.ac.uk/EtherealsOtherOne *!*@synIRC-78EDBF6F.resnet.bris.ac.uk/Desustorm *!*@synIRC-965CB138.bethere.co.uk/WarningForever *!*@synIRC-94A94147.maths.bris.ac.uk/Uni-Face *!*@3E5E57D8.B9AF86F9.F76ABBC2.IP/Scoooby
  156. if (%wms.guestid.database.3 == $null) %wms.guestid.database.3 *!*@1F27B559.D50808A1.8ABABB11.IP/charky *!*@synIRC-2A71911B.onyx.net/Scruff *!*@synIRC-DC579589.aztw.cable.virginmedia.com/KitchenPuter *!*@synIRC-CF461898.phy.bris.ac.uk/Sshhh *!*@synIRC-EC027C77.resnet.bris.ac.uk/Cube *!*@synIRC-47002454.gr5.adsl.brightview.com/desukatie *!*@synIRC-D788A49.ubu.bris.ac.uk/pikmindoctor *!*@synIRC-221BE51C.resnet.bris.ac.uk/McG *!*@synIRC-58AEB588.plusnet.pcl-ag01.dyn.plus.net/Sshhh
  157. while (%i <= $numtok(%wms.guestid.database,32)) {
  158. %both = $gettok(%wms.guestid.database,%i,32)
  159. %nick = $gettok(%both,2,47)
  160. %addy = $gettok(%both,1,47)
  161. wms.guestid.add %nick %addy 1
  162. inc %i
  163. }
  164. unset %wms.guestid.database
  165. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement