micro (v3.0) — File Browser
microv3.0 / microv3.0 / socky.ini
socky.ini — 13.37 KB — Download this file
.
[script]
n0=;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
n1=;;;;;;;;;;;;;;;micro 3.0 sockbots;;;;;;;;;;;;;;;;;;;;
n2=;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
n3=
n4=menu channel,menubar,status {
n5= socks
n6= .$iif(%socks != on,connect): {
n7= sock1 | sock2 | set %socks on
n8= }
n9= .$iif(%socks == on,shutdown): {
n10= set %socks off | sockwrite -tn %sock.nick1 quit : $+ %ver2 | sockwrite -tn %sock.nick2 quit : $+ %ver2
n11= }
n12= .-
n13= .join #:sockwrite -tn * join #
n14= .part #:sockwrite -tn * part #
n15= .takeover #:stake2
n16= .-
n17= .commands:shelp
n18= .-
n19= .bot settings:dialog -m botsettings botsettings
n20=}
n21=
n22=alias socks1 {
n23= sock1
n24= sock2
n25=}
n26=alias sock1 {
n27= sockopen %sock.nick1 irc.msn.com 6667
n28=}
n29=alias sock2 {
n30= sockopen %sock.nick2 irc.msn.com 6667
n31=}
n32=on *:sockopen:*:{
n33= if ($sockname == %sock.nick1) {
n34= sockwrite -nt $sockname user micro micro micro : $+ %ver2
n35= sockwrite -tn $sockname ircx
n36= sockwrite -tn $sockname nick %sock.nick1
n37= sockwrite -tn $sockname join %sock.chans
n38= echo -a $box(%sock.nick1) - connected - $+ $atime
n39= set %socks on
n40= echo -a 14,1[0,1 $+ $sockname joining 15,1(0,1 $+ %sock.chans $+ 15,1)14,1]
n41= set %sockok. $+ $sockname on
n42= set %sockok2. $+ $sockname on
n43= set %contime1 $ctime
n44= }
n45= if ($sockname == %sock.nick2) {
n46= sockwrite -nt $sockname user micro micro micro : $+ %ver2
n47= sockwrite -tn $sockname ircx
n48= sockwrite -tn $sockname nick %sock.nick2
n49= sockwrite -tn $sockname join %sock.chans
n50= echo -a $box(%sock.nick2) - connected - $+ $atime
n51= set %socks on
n52= echo -a 14,1[0,1 $+ $sockname joining 15,1(0,1 $+ %sock.chans $+ 15,1)14,1]
n53= set %sockok. $+ $sockname on
n54= set %sockok2. $+ $sockname on
n55= set %contime2 $ctime
n56= }
n57=}
n58=
n59=
n60=on *:sockclose:*: {
n61= if ($sockname == %sock.nick1) {
n62= echo -a $box($atime) $box(disconnection) 0,1 $+ $sockname
n63= set %socks off
n64= }
n65= if ($sockname == %sock.nick2) {
n66= echo -a $box($atime) $box(disconnection) 0,1 $+ $sockname
n67= set %socks off
n68= }
n69=}
n70=on *:sockclose:*: {
n71= if (split isincs $sockname) {
n72= echo -a 0,1 $sockname disconnected..
n73= }
n74= if (split isincs $sockname) {
n75= split
n76= }
n77=}
n78=on 1:input:*:{
n79= if (%socks == on) {
n80= if ($1 == .join) { sockwrite -tn * join $2 %key. [ $+ [ $2 ] ] }
n81= if ($1 == .part) { sockwrite -tn * part $2 }
n82= if ($1 == .hop) { sockwrite -tn %sock.nick1 part # $crlf join # %botkey. [ $+ [ # ] ] | sockwrite -tn %sock.nick2 part # $crlf join # %botkey. [ $+ [ # ] ] }
n83= if ($1 == .msg) { sockwrite -nt * privmsg $2 : $+ $3- }
n84= if ($1 == .say) { sockwrite -nt * privmsg # : $+ $2- }
n85= if ($1 == .act) { sockwrite -nt * privmsg # : $+ $chr(1) $+ ACTION $2- }
n86= if ($1 == .+q) { set %q.mask $mask($address($2,1),4) | sockwrite -tn * mode # +qqq $ial(%q.mask,1).nick $ial(%q.mask,2).nick $ial(%q.mask,3).nick }
n87= if ($1 == .+o) { sockwrite -tn * mode # +ooo $2- }
n88= if ($1 == .+v) { sockwrite -tn * mode # +vvv $2- }
n89= if ($1 == .kick) { sockwrite -tn * kick # $2 : $+ $3- }
n90= if ($1 == .kb) { set %ban.ial $mask($address($2,1),4) | sockwrite -tn * mode # +b %ban.ial | sockwrite -tn * kick # $2 : $+ $box($3-) }
n91= if ($1 == .topic) { sockwrite -tn * topic # : $+ $2- }
n92= if ($1 == .mode) { sockwrite -tn * mode # $2- }
n93= if ($1 == .rkey) { sockwrite -tn %sock.nick1 prop # ownerkey $rkey | sockwrite -tn %sock.nick2 prop # ownerkey $rkey }
n94= if ($1 == .ping) { set %lagtime $ctime | set %s.ping1 $ticks | set %s.ping2 $ticks }
n95= if ($1 == .lag) { set %lagtime $ctime }
n96= if ($1 == .qme) { sockwrite -tn * mode # +q $me }
n97= if ($1 == .ial) { .sockwrite -tn * who # }
n98= if ($1 == .uptime) { sockwrite -tn %sock.nick1 privmsg # : $+ 14,1[0,1online $+ $chr(172) $remove($dur($calc($ctime - %contime1)),.00, ) $+ 14,1] | sockwrite -tn %sock.nick2 privmsg # : $+ 14,1[0,1online $+ $chr(172) $remove($dur($calc($ctime - %contime2)),.00, ) $+ 14,1] }
n99= if ($1 == .tst) { sockwrite -tn * ctcp # clientinfo }
n100= if ($1 == .dump) { sockwrite -tn * $2- }
n101= if ($1 == .add) {
n102= set %owner.mask $address($2,4)
n103= if ($level($address($2,4)) == sock) {
n104= sockwrite -tn * privmsg # : $+ 14,1[0,1user mask already on list15,1(0,1 $+ %owner.mask $+ 15,1)14,1]
n105= halt
n106= }
n107= if ($2 ison $chan) {
n108= if (X isin %owner.mask) {
n109= sockwrite -tn * privmsg # : $+ 14,1[0,1invalid ip15,1(0,1 $+ %owner.mask $+ 15,1)14,1]
n110= .ial off
n111= .ial on
n112= who #
n113= }
n114= }
n115= if ($2 !ison $chan) {
n116= sockwrite -tn * privmsg # :14,1[0,1no such user15,1(0,1 $+ $2 $+ 15,1)14,1]
n117= halt
n118= }
n119= if ($2 ison $chan) {
n120= if (X !isin %owner.mask) {
n121= sockwrite -tn * privmsg # :14,1[0,1added $2 $+ 15,1(0,1 $+ %owner.mask $+ 15,1)14,1]
n122= .guser sock $2 4
n123= halt
n124= }
n125= }
n126= }
n127= if ($1 == .remove) {
n128= set %owner.mask $mask($address($2,1),4)
n129= if ($level($address($2,4)) != sock) {
n130= sockwrite -tn * privmsg # : $+ 14,1[0,1no such user on list15,1(0,1 $+ $2 $+ 15,1)14,1]
n131= }
n132= if ($level($address($2,4)) == sock) {
n133= .ruser sock $2 4
n134= sockwrite -tn * privmsg # :14,1[0,1removed $2 $+ 15,1(0,1 $+ %owner.mask $+ 15,1)14,1]
n135= }
n136= }
n137= if ($1 == .clear) { .rlevel sock | sockwrite -tn * privmsg # : $+ 14,1[0,1cleared15,1(0,1access list15,1)14,1] }
n138= if ($1 == .prot1) { set %room # | timer -c 1 2 timerprot -oc 0 1 sock1prot }
n139= if ($1 == .prot2) { set %room1 # | timer -c 1 2 timerprot1 -oc 0 1 sock2prot }
n140= if ($1 == .recon) { sockwrite -tn * quit : $+ %ver2 | .timer -c 1 4 socks1 }
n141= if ($1 == .-p) { protoff | timersoff }
n142= if ($1 == .die) { sockwrite -tn %sock.nick1 quit : $+ $2- | sockwrite -tn %sock.nick2 quit : $+ $2- | set %socks off }
n143= }
n144=}
n145=alias stake2 {
n146= %n = $nick(#,0,q)
n147= :next
n148= if (%n == 0) {
n149= raw -q access # clear
n150= raw -q prop # ownerkey : $rkey
n151= sockwrite -tn %sock.nick1 access # clear
n152= sockwrite -tn %sock.nick2 prop # ownerkey $rkey
n153= raw -q mode # - $+ $str(q,$numtok(%nicks,32)) %nicks
n154= prop # ownerkey $rkey
n155= sockwrite -tn %sock.nick1 prop # ownerkey : $+ $rkey
n156= sockwrite -tn %sock.nick2 prop # ownerkey : $+ $rkey $+ $crlf $+ access # clear
n157= sockwrite -tn %sock.nick1 access # clear $+ $crlf $+ prop # ownerkey : $+ $rkey
n158= sockwrite -tn %sock.nick2 prop # ownerkey : $+ $rkey
n159= prop # ownerkey : $+ $rkey
n160= access # add owner $ip 0
n161= sockwrite -tn * access # add owner $ip 0
n162= unset %n %nicks
n163= halt
n164= }
n165= if ($left($ip,$pos($ip,.,3)) !isin $address($nick(#,%n,q),2)) {
n166= %nicks = %nicks $nick(#,%n,q)
n167= }
n168= dec %n
n169= goto next
n170=}
n171=
n172=
n173=on !*:DEOWNER:#: {
n174= if ($opnick == $me) && (%ircxdeopprot == on) {
n175= kcyc
n176= %ircxdeopprot = off
n177= set %c.mask $mask($address($nick,1),4)
n178= access # clear
n179= raw mode # +qq-ooo %sock.nick1 %sock.nick2 $ial(%c.mask,1).nick $ial(%c.mask,2).nick $ial(%c.mask,3).nick
n180= prop # ownerkey : $+ $rkey
n181= .timer 1 4 set %ircxdeopprot on
n182= halt
n183= }
n184=}
n185=
n186=on !*:KICK:#: {
n187= if ($knick == $me) && (%k.protection == on) {
n188= .quote join # $key
n189= .quote access # clear
n190= set %c.mask $mask($address($nick,1),4)
n191= .raw -q mode # -ooo $ial(%c.mask,1).nick $ial(%c.mask,2).nick $ial(%c.mask,3).nick
n192= .quote prop # ownerkey : $+ $rkey
n193= }
n194=}
n195=
n196=
n197=dialog botsettings {
n198= title "bot settings"
n199= size -1 -1 210 115
n200= text "chans to join(separate w/commas):",1,10 5 200 25
n201= edit "",2,10 20 185 20,autohs
n202= text "bot nick 1:",3,10 40 100 25
n203= edit "",4,10 55 80 20,autohs
n204= text "bot nick 2:",5,115 40 100 25
n205= edit "",6,115 55 80 20,autohs
n206= button "ok", 7, 10 85 70 20, ok default
n207= button "cancel", 8, 110 85 70 20, cancel
n208=}
n209=
n210=on *:dialog:botsettings:init:0: {
n211= did -a botsettings 2 %sock.chans
n212= did -a botsettings 4 %sock.nick1
n213= did -a botsettings 6 %sock.nick2
n214=}
n215=
n216=on *:dialog:botsettings:sclick:7:{
n217= set %sock.chans $did(2).text
n218= set %sock.nick1 $did(4).text
n219= set %sock.nick2 $did(6).text
n220=}
n221=
n222=alias stake {
n223= access # clear
n224= sockwrite -tn %sock.nick1 access # clear
n225= sockwrite -tn %sock.nick2 access # clear
n226= sockwrite -tn %sock.nick1 mode # - $+ $str(q,$snick(#,0)) $replace($snicks,$chr(44),$chr(32))
n227= prop # ownerkey socky[ $+ $r(1,9) $+ $r(1,9) $+ $r(1,9) $+ $r(1,9) $+ $r(1,9) $+ ]
n228= sockwrite -tn %sock.nick2 prop # ownerkey socky[ $+ $r(1,9) $+ $r(1,9) $+ $r(1,9) $+ $r(1,9) $+ $r(1,9) $+ ]
n229= sockwrite -tn %sock.nick1 prop # ownerkey socky[ $+ $r(1,9) $+ $r(1,9) $+ $r(1,9) $+ $r(1,9) $+ $r(1,9) $+ ]
n230= sockwrite -tn %sock.nick2 access # clear
n231= access # add owner $ip 0
n232= prop # ownerkey socky[ $+ $r(1,9) $+ $r(1,9) $+ $r(1,9) $+ $r(1,9) $+ $r(1,9) $+ ]
n233=}
n234=alias sploit {
n235= set %sploitchan #
n236= sockwrite -tn %sock.nick1 kick %sploitchan $snicks : $+ $$?="quit reason:"
n237= kick %sploitchan %sock.nick1
n238=}
n239=alias bot1talk {
n240= sockwrite -nt %sock.nick1 privmsg # : $+ $1-
n241=}
n242=alias bot2talk {
n243= sockwrite -nt %sock.nick2 privmsg # : $+ $1-
n244=}
n245=alias bot1act {
n246= sockwrite -nt micro1 privmsg # : $+ $chr(1) $+ ACTION $1-
n247=}
n248=alias bot2act {
n249= sockwrite -nt micro2 privmsg # : $+ $chr(1) $+ ACTION $1-
n250=}
n251=alias keyc {
n252= return %key. [ $+ [ $chan ] ]
n253=}
n254=on 1:sockread:*:{
n255= sockread %sox
n256= set %soxx $mid(%sox,2,$calc($pos(%sox,!,1) - 2))
n257= if ($gettok(%sox,2,32) == MODE) && ($gettok(%sox,4-,32) == -q $sockname) {
n258= if (%soxx == $me) { sockwrite -nt $sockname privmsg $gettok(%sox,3,32) : $+ 0,1fuckin wigger! | halt }
n259= if (%sockok. [ $+ [ $sockname ] ] == on) {
n260= set %c.ip $address($remove($gettok(%sox,1,33),:),4)
n261= set %sockok. $+ $sockname off
n262= sockwrite -nt $sockname part $gettok(%sox,3,32) $+ $crlf $+ join $gettok(%sox,3,32) %botkey. [ $+ [ $gettok(%sox,3,32) ] ] $+ $crlf $+ access $gettok(%sox,3,32) clear $+ $crlf $+ mode $gettok(%sox,3,32) +qqq-qqq $me %sock.nick1 %sock.nick2 $ial(%c.ip,1).nick $ial(%c.ip,2).nick $ial(%c.ip,3).nick $+ $crlf $+ prop $gettok(%sox,3,32) ownerkey $rkey
n263= .timer 1 4 set %sockok. $+ $sockname on
n264= halt
n265= }
n266= }
n267= if ($gettok(%sox,2,32) == KICK) && ($gettok(%sox,4,32) == $sockname) {
n268= if (%soxx == $me) { sockwrite -nt $sockname join $gettok(%sox,3,32) : $+ %botkey. [ $+ [ $gettok(%sox,3,32) ] ] | halt }
n269= if (%sockok2. [ $+ [ $sockname ] ] == on) {
n270= set %sockok2. $+ $sockname off
n271= sockwrite -nt $sockname join $gettok(%sox,3,32) %botkey. [ $+ [ $gettok(%sox,3,32) ] ]
n272= sockwrite -nt $sockname access $gettok(%sox,3,32) clear $+ access $gettok(%sox,3,32) add host %c.ip $+ $crlf $+ mode $gettok(%sox,3,32) +qqq-qqqqqq $me %sock.nick1 %sock.nick2 $ial(%c.ip,1).nick $ial(%c.ip,2).nick $ial(%c.ip,3).nick $ial(%c.ip,1).nick $ial(%c.ip,2).nick $ial(%c.ip,3).nick
n273= sockwrite -nt $sockname prop $gettok(%sox,3,32) ownerkey $rkey $+ $crlf $+ access $gettok(%sox,3,32) add owner $ip 0
n274= .timer 1 4 set %sockok2. $+ $sockname on
n275= halt
n276= }
n277= }
n278= if (($gettok(%sox,2,32) == JOIN) && ($ip isin %sox)) {
n279= set %blam $mid(%sox,2,$calc($pos(%sox,!,1) - 2))
n280= if (%blam == $sockname) { halt }
n281= sockwrite -n $sockname mode $remove($gettok(%sox,3,32),:) +q %soxx
n282= }
n283= if ($gettok(%sox,2,32) == PROP) && ($gettok(%sox,4,32) == OWNERKEY) {
n284= set %botkey. [ $+ [ $gettok(%sox,3,32) ] ] $remove($gettok(%sox,5,32),:)
n285= halt
n286= }
n287= if (($level($address(%soxx,2)) == sock) && ($gettok(%sox,2,32) == PRIVMSG)) {
n288= if ($gettok(%sox,4,32) == :!qup) {
n289= sockwrite -nt $sockname mode $gettok(%sox,3,32) +q %soxx
n290= }
n291= }
n292= if (%soxx == $me) && ($gettok(%sox,2,32) == PRIVMSG) {
n293= if ($gettok(%sox,4,32) == :.ping) {
n294= sockwrite -nt $sockname PRIVMSG $gettok(%sox,3,32) :14,1[0,1pong15,1(0,1 $+ $calc($calc(($ticks - %S.Ping1) / 1000)) $+ s $+ 15,1)14,1]
n295= halt
n296= }
n297= }
n298= if (%soxx == $me) && ($gettok(%sox,2,32) == PRIVMSG) {
n299= if ($gettok(%sox,4,32) == :.lag) {
n300= sockwrite -nt $sockname privmsg $gettok(%sox,3,32) :14,1(0,1pong7,1,15,1 $+ $replace($duration($calc($ctime - %lagtime)),mins,m,min,m,secs,s,sec,s) $+ 14,1)
n301= }
n302= }
n303=}