Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias start_sock {
- ;; Edit options below
- %api_key = B45E95F5-998B-2384-5136-5A071125F0C2
- %api_pass = 58a5147a588295829b21c94a90ab5741
- set %DOPASSPORT $true
- set %DOTRACE $true
- /api add %api_key %api_pass
- $sock_close()
- $sock_open()
- }
- alias sock_trace {
- if (%DOTRACE) {
- if (!$window(@trace)) { /window -e @trace }
- echo @trace $timestamp $1-
- }
- }
- alias sock_close {
- sockclose oax.*
- }
- alias sock_open {
- sockopen oax. $+ $rand(11111111111,99999999999) 75.126.194.90 6667
- }
- alias dosock {
- $sock_trace(-> $2-)
- sockwrite -n $1-
- }
- on *:sockopen:oax.*: {
- dosock $sockname IRCVERS IRCW OASIZ-WEBC!1.0.3.0
- dosock $sockname AUTH $iif(%DOPASSPORT,GateKeeperPassport,GateKeeper) I :OASSP000000X1A
- }
- on *:sockread:oax.*: {
- var %o | sockread %o | tokenize 32 %o
- $sock_trace(<- $1-)
- if ($1 == PING && $2) {
- dosock $sockname PONG $2-
- }
- elseif ($1 == AUTH) {
- if ($3 == S) {
- if ($4 == :OK) {
- if (%DOPASSPORT) {
- dosock $sockname AUTH GateKeeperPassport S : $+ %_oa.authcode
- }
- else {
- dosock $sockname NICK socket_ $+ $rand(000,999)
- }
- }
- else {
- set %_oa.challengeType 0
- set %_oa.challengeCode 0
- $api_call(2, $remove($4,:OASSP000000))
- .timer. $+ $sockname 0 1 challenge_code_check $sockname
- }
- }
- }
- }
- alias challenge_code_check {
- if (%_oa.challengeCode != 0) {
- .timer. $+ $1 off
- dosock $1 AUTH $iif(%DOPASSPORT,GateKeeperPassport,GateKeeper) S :OASSP000000 $+ $+ %_oa.challengeCode
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment