Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \
- ; | Wyrm's mIRC Scripts - Guest Identifier Script |
- ; | Automatic name detection from hostnames, including with automatic database construction |
- ; \ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /
- ; To add any channel use /wms.guestid.setup WC [PUB]
- ; In any channel you want added, where:
- ; WC is the wildcard pattern you wish to match against (*guest* will likely be most useful)
- ; Giving any second argument will make announcements about the identity of the new person public (ie messages the channel instead of using echo)
- ALIAS wms.guestid.setup {
- if ($1 == $null) { echo 7 -a $timestamp 4You need to specify a wildcard to match the nicks against. | return }
- if ($2 != $null) {
- if (%wms.guestid.chanlist == $null) set %wms.guestid.chanlist [ # $+ : $+ [ $network ] $+ :pub: $+ [ $1 ] ]
- else set %wms.guestid.chanlist [ %wms.guestid.chanlist # $+ : $+ [ $network ] $+ :pub: $+ [ $1 ]] ]
- 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.
- }
- else {
- echo 7 -a $timestamp 4Added # on $network to list of channels. Will match7 $1 4against all nicks joining.
- if (%wms.guestid.chanlist == $null) set %wms.guestid.chanlist [ # $+ : $+ [ $network ] $+ :priv: $+ [ $1 ] ]
- else set %wms.guestid.chanlist [ %wms.guestid.chanlist # $+ : $+ [ $network ] $+ :priv: $+ [ $1 ] ]
- }
- if (%wms.guestid.database.1 == $null) set %wms.guestid.database.1
- }
- ALIAS wms.guestid.add {
- ;$1 name
- ;$2 ip
- ;$3 table number
- if (%wms.guestid.database. [ $+ [ $3 ] ] == $null) set %wms.guestid.database. [ $+ [ $3 ] ]
- if ($istok( %wms.guestid.database. [ $+ [ $3 ] ] , [ $2 ] $+ $chr(47) $+ [ $1 ] ,32)) noop
- if ($numtok(%wms.guestid.database. [ $+ [ $3 ] ] ,32) < 40) set %wms.guestid.database. [ $+ [ $3 ] ] %wms.guestid.database. [ $+ [ $3 ] ] [ $2 ] $+ $chr(47) $+ [ $1 ]
- else wms.guestid.add.recursive $1 $2 $calc( [ $3 ] +1 )
- }
- ALIAS wms.guestid.add.recursive wms.guestid.add $1-
- ALIAS wms.guestid.lookup {
- ;$1 host
- var %dbnum = 0
- var %num = 0
- var %nick
- var %nicklist
- while (%dbnum < $var(%wms.guestid.database.*,0)) {
- inc %dbnum
- var %n = $numtok(%wms.guestid.database. [ $+ [ %dbnum ] ] ,32)
- var %i = 1
- while (%i <= %n) {
- if ($gettok($gettok(%wms.guestid.database. [ $+ [ %dbnum ] ] ,%i,32),1,47) == $1) {
- %nick = $gettok($gettok(%wms.guestid.database. [ $+ [ %dbnum ] ] ,%i,32),2,47)
- %nicklist = %nicklist $gettok($gettok(%wms.guestid.database. [ $+ [ %dbnum ] ] ,%i,32),2,47)
- inc %num
- }
- inc %i
- }
- }
- %i = 1
- %n = $numtok(%nicklist,32)
- var %nicks
- while (%i < %n) {
- %nicks = %nicks $gettok(%nicklist,%i,32) $+ ,
- inc %i
- }
- %nicks = $left(%nicks,-1) or %nick
- if ($prop == num) return %num
- if ($prop == nick) return %nick
- if ($prop == nicks) return %nicks
- }
- ALIAS wms.guestid.ghost {
- var %n $nick($2,0)
- var %i = 1
- var %exists = $false
- var %nicklist,%nicks
- while (%i <= %n) {
- if (($3 != $nick($2,%i)) && ($address($nick($2,%i),2) == $1)) { %nicklist = %nicklist $nick($2,%i) | %exists = $true }
- inc %i
- }
- if ($numtok(%nicklist,32) < 2) %nicks = %nicklist
- else {
- %i = 1
- %n = $numtok(%nicklist,32)
- while (%i < %n) {
- %nicks = %nicks $gettok(%nicklist,%i,32) $+ ,
- inc %i
- }
- %nicks = $left(%nicks,-1) or %nick
- }
- if ($prop == exists) return %exists
- else return %nicks
- }
- on *:NICK: {
- var %n = $numtok(%wms.guestid.chanlist,32)
- var %i = 1
- var %chanlist
- var %net,%p,%wc
- while (%i <= %n) {
- %chanlist = $gettok(%wms.guestid.chanlist,%i,32)
- %net = $gettok(%chanlist,2,58)
- %p = $gettok(%chanlist,3,58)
- %wc = $gettok(%chanlist,4-,58)
- if (($network == %net) && (%wc iswm $nick)) {
- wms.guestid.add $newnick $address($newnick,2) 1
- break
- }
- inc %i
- }
- }
- on *:JOIN:#: {
- var %n = $numtok(%wms.guestid.chanlist,32)
- var %i = 1
- var %possibles
- var %chanlist
- var %chan,%net,%p,%wc
- while (%i <= %n) {
- %chanlist = $gettok(%wms.guestid.chanlist,%i,32)
- %chan = $gettok(%chanlist,1,58)
- %net = $gettok(%chanlist,2,58)
- %p = $gettok(%chanlist,3,58)
- %wc = $gettok(%chanlist,4-,58)
- if ((# == %chan) && ($network == %net) && (%wc iswm $nick)) {
- %possibles = %possibles %chanlist
- }
- inc %i
- }
- if (%possibles == $null) return
- %i = 1
- %n = $numtok(%possibles,32)
- while (%i <= %n) {
- if (%p != $gettok($gettok(%possibles,%i,32),3,58)) {
- echo 4 # $timestamp Name matches both private and public wildcards! Using private to be safe.
- %p = priv
- break
- }
- inc %i
- }
- var %num = $wms.guestid.lookup($address($nick,2)).num
- var %str
- if (%num == 0) {
- if ($wms.guestid.ghost($address($nick,2),#,$nick).exists) {
- %str = 7That's $wms.guestid.ghost($address($nick,2),#,$nick) pissing about with another connection...
- }
- else %str = 7nfi who that is, will work it out when they reveal themselves!
- }
- else if (%num == 1) %str = 7That's $wms.guestid.lookup($address($nick,2)).nick $+ !
- else if (%num > 1) %str = 7That's $wms.guestid.lookup($address($nick,2)).nicks $+ !
- if (%p == something itll never be) {
- msg # %str
- scon 1 echo -gt line 146 id script throws error! % str is: %str
- }
- else echo 4 # $timestamp %str
- }
- ALIAS wms.guestid.upgrade {
- var %i = 1
- var %both
- var %nick
- var %addy
- 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
- 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
- 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
- while (%i <= $numtok(%wms.guestid.database,32)) {
- %both = $gettok(%wms.guestid.database,%i,32)
- %nick = $gettok(%both,2,47)
- %addy = $gettok(%both,1,47)
- wms.guestid.add %nick %addy 1
- inc %i
- }
- unset %wms.guestid.database
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement