- 1alias q {
- 2 query $1
- 3 unset %kjsjd2
- 4 set %kjsjd2 $1
- 5 set -u2 %kjsjd1 on
- 6 who $1
- 7}
- 8on *:active:?:{
- 9 if (%privadosopen == $query(0)) { halt }
- 10 set %privadosopen $query(0)
- 11 unset %kjsjd2
- 12 set %kjsjd2 $active
- 13 set -u3 %kjsjd1 on
- 14 whois $active
- 15}
- 16on *:close:?:{
- 17 unset %privadosopen
- 18}
- 19on *:active:#:{
- 20 set %iwho.x $calc($mouse.dx -195)
- 21 set %iwho.y $calc($mouse.dy -15)
- 22 if (%kjsjd1 == on) { halt }
- 23 if (%hhsdq == on) { halt }
- 24 if (%hhsdq2 == on) { halt }
- 25 if (%hhsdq3 == on) { halt }
- 26 unset %webfotoveo
- 27 set %webfotoveo2 $chan
- 28 set -u7 %hhsdq on
- 29 who %webfotoveo2
- 30}
- 31on *:open:?: {
- 32 unset %kjsjd2
- 33 set %kjsjd2 $nick
- 34 set -u4 %kjsjd1 on
- 35 who $nick
- 36}
- 37on *:join:*: {
- 38 if ($nick == $me) {
- 39 unset %webfotoveo
- 40 set %webfotoveo2 $chan
- 41 set -u7 %hhsdq on
- 42 who %webfotoveo2
- 43 }
- 44}
- 45raw 311:*: {
- 46 if (%kjsjd1 == on) {
- 47 if ($left($6,2) == I3) && ($len($6) >= 55) {
- 48 MaeMia images.chateagratis.net $+ $gettok($decode( $+ $6 $+ , m),4-,124)
- 49 }
- 50 }
- 51}
- 52on *:load: { if (!$isdir(FotoMaton)) mkdir FotoMaton }
- 53alias idir return $qt($+($mircdirFotoMaton\,$1))
- 54alias maemia {
- 55 if (!$1) return
- 56 var %u = https:// $+ $remove($1,$chr(32)), %h = $gettok(%u, 2, 47), %p = $gettok(%u, 3-, 47)
- 57 var %n = $regsubex($gettok($gettok(%p, -1, 47), 1, 63),/[\\/|:?*"<>]/g,_), %dir = $mircdirFotoMaton\
- 58 var %f = %dir $+ %n $+ .jpg, %f_fix = %dir $+ %n $+ _fix.jpg
- 59 if (!$isdir(%dir)) mkdir %dir
- 60 if ($exists(%f_fix)) { .timer $+ $ticks -m 1 50 MaeMia.open $qt(%f_fix) | return }
- 61 if ($exists(%f)) {
- 62 bread $qt(%f) 0 100 &h
- 63 if (RIFF isin $bvar(&h,1,100).text) { .remove $qt(%f) }
- 64 else { .timer $+ $ticks -m 1 50 MaeMia.open $qt(%f) | return }
- 65 }
- 66 if ($sock(mae_ $+ %n $+ *)) return
- 67 var %id = mae_ $+ %n $+ _ $+ $ticks
- 68 hadd -m %id f %f | hadd %id h %h | hadd %id p / $+ %p | hadd %id n %n
- 69 sockopen %id %h 80
- 70}
- 71
- 72on *:sockopen:mae_*: {
- 73 if ($sockerr) { if ($hget($sockname)) hfree $sockname | return }
- 74 sockwrite -n $sockname GET $hget($sockname,p) HTTP/1.1
- 75 sockwrite -n $sockname Host: $hget($sockname,h)
- 76 sockwrite -n $sockname User-Agent: Mozilla/5.0 | sockwrite -n $sockname Connection: close | sockwrite -n $sockname $crlf
- 77}
- 78
- 79on *:sockread:mae_*: {
- 80 if (!$sock($sockname).mark) { var %h | sockread %h | if (!%h) sockmark $sockname 1 | return }
- 81 if ($hget($sockname,f_ok)) return
- 82 :next | sockread -f &d | if ($sockbr) {
- 83 var %f = $hget($sockname,f)
- 84 if (!$fopen($sockname)) .fopen -no $sockname $qt(%f)
- 85 .fwrite -b $sockname &d
- 86 if ($file(%f).size < 5000 && !$hget($sockname,db)) {
- 87 bread $qt(%f) 0 100 &h | hadd $sockname db 1
- 88 var %x = $bvar(&h,1,100).text
- 89 if (RIFF isin %x) { hadd $sockname webp 1 }
- 90 if (GIF89a isin %x) || (ANIM isin %x) { hadd $sockname anim 1 }
- 91 }
- 92 goto next
- 93 }
- 94}
- 95
- 96on *:sockclose:mae_*: {
- 97 if ($fopen($sockname)) .fclose $sockname
- 98 if ($hget($sockname)) {
- 99 var %f = $hget($sockname,f), %webp = $hget($sockname,webp), %t = $ticks
- 100 if (!$hget($sockname,f_ok) && %f && $exists(%f)) {
- 101 if (%webp) {
- 102 var %f_st = $replace(%f,.jpg,_st.webp), %f_fix = $replace(%f,.jpg,_fix.jpg)
- 103 .run -h $qt($mircdir $+ webpmux.exe) -get frame 2 $qt(%f) -o $qt(%f_st)
- 104 .timerCONV_ [ $+ [ %t ] ] -m 1 300 .run -h $qt($mircdir $+ dwebp.exe) $qt(%f_st) -o $qt(%f_fix)
- 105 .timerPLANB_ [ $+ [ %t ] ] -m 1 400 if (!$exists(%f_fix)) .run -h $qt($mircdir $+ dwebp.exe) $qt(%f) -o $qt(%f_fix)
- 106 .timerOPEN_ [ $+ [ %t ] ] -m 1 800 scid $cid MaeMia.open $unsafe($qt(%f_fix))
- 107 .timerREM_ [ $+ [ %t ] ] 1 60 .remove $qt(%f) | .timerREMS_ [ $+ [ %t ] ] 1 60 .remove $qt(%f_st) | .timerREMF_ [ $+ [ %t ] ] 1 60 .remove $qt(%f_fix)
- 108 }
- 109 else { .timer -m 1 150 scid $cid MaeMia.open $unsafe($qt(%f)) | .timer 1 60 .remove $qt(%f) }
- 110 }
- 111 hfree $sockname
- 112 }
- 113}
- 114
- 115alias MaeMia.open {
- 116 var %a = $qt($1-),%b = $calc($pic(%a).width +20),%c = $calc($pic(%a).height +40)
- 117 if ($window(@FotoMaton)) window -c @FotoMaton
- 118 if (%hhsdq2 == on) {
- 119 did -g fotovisorx 1 %a
- 120 .unset %hhsdq2
- 121 .set -u3 %hhsdq3 on
- 122 halt
- 123 }
- 124 if (%hhsdq2x == on) {
- 125 did -g fotovisorx2 1 %a
- 126 .unset %hhsdq2x
- 127 .set -u3 %hhsdq3 on
- 128 halt
- 129 }
- 130 /background -p %kjsjd2 %a
- 131}
- 132
- 133raw 352:*: {
- 134 if (%hhsdq == on) && (%hhsdq2 != on) {
- 135 if ($left($9,2) == I3) && ($len($9) >= 35) {
- 136 if (default.png isin $remove($replace($gettok($decode( $+ $9 $+ , m),4-,124),medium,large),$chr(32))) { halt }
- 137 cline 71 %webfotoveo2 $6
- 138 halt
- 139 }
- 140 halt
- 141 }
- 142 if (%hhsdq2 == on) && (%hhsdq != on) {
- 143 if ($left($9,2) == I3) && ($len($9) >= 35) {
- 144 if (default.png isin $remove($replace($gettok($decode( $+ $9 $+ , m),4-,124),medium,large),$chr(32))) { halt }
- 145 set %iwho.x $calc($mouse.dx -195)
- 146 set %iwho.y $calc($mouse.dy -15)
- 147 dialog $iif($dialog(fotovisorx),-x,-m) fotovisorx fotovisorx
- 148 Fotovisor
- 149 MaeMia images.chateagratis.net $+ $gettok($decode( $+ $9 $+ , m),4-,124)
- 150 halt
- 151 }
- 152 }
- 153 if (%hhsdq2x == on) {
- 154 if ($left($9,2) == I3) && ($len($9) >= 35) {
- 155 if (default.png isin $remove($replace($gettok($decode( $+ $9 $+ , m),4-,124),medium,large),$chr(32))) { halt }
- 156 MaeMia images.chateagratis.net $+ $gettok($replace($decode( $+ $9 $+ , m),medium,large),4-,124)
- 157 halt
- 158 }
- 159 }
- 160}
- 161raw 315:*: {
- 162 if (%hhsdq == on) || (%hhsdq3 == on) || (%hhsdq2 == on) || (%hhsdq2x == on) {
- 163 halt
- 164 }
- 165}
- 166alias midclick {
- 167 unset %uix.clones
- 168 set %uix.target $$1
- 169 unset %uix.chans
- 170 w $$1
- 171 check $$1
- 172 who $$1 n%tuihsnfdlar
- 173}
- 174on *:load:{ start.catch.nickselect.timer | if (!$isdir(FotoMaton)) mkdir FotoMaton | .unset %timerfoto }
- 175on *:unload:{ .timer.catch.nickselect.for. $+ $cid off | .unset %timerfoto }
- 176on *:connect:{ start.catch.nickselect.timer }
- 177alias start.catch.nickselect.timer .timer.catch.nickselect.for. $+ $cid -m 0 100 catch.nickselect.timer.alias
- 178alias -l catch.nickselect.timer.alias {
- 179 if ($chan($active)) {
- 180 if (%hhsdq == on) { halt }
- 181 if ($snick($active,0) == 1) {
- 182 if ($($+(%,last.snick.for.,$cid,.,$active),2) != $snick($active,1)) {
- 183 set -u2 %hhsdq2 on
- 184 set -u1 %hhsdq off
- 185 set %iwho.x $calc($mouse.dx -195)
- 186 set %iwho.y $calc($mouse.dy -15)
- 187 set %nickdeluservisor $snick($active,1)
- 188 set %descadenada $active
- 189 ;;who $snick($active,1)
- 190 ;;unset %uix.clones
- 191 ;;set %uix.target $$snick($active,1)
- 192 ;;unset %uix.chans
- 193 ;;check $$snick($active,1)
- 194 ;;who $$snick($active,1) n%tuihsnfdlar
- 195 }
- 196 set $+(%,last.snick.for.,$cid,.,$active) $snick($active,1)
- 197 }
- 198 }
- 199}
- 200
- 201alias Fotovisor {
- 202 set -u2 %hhsdq2 on
- 203 set %iwho.x $calc($mouse.dx -195)
- 204 set %iwho.y $calc($mouse.dy -15)
- 205 dialog $iif($dialog(fotovisorx),-v,-m) fotovisorx fotovisorx
- 206 ;;dialog -m fotovisorx fotovisorx
- 207 dialog -t fotovisorx %nickdeluservisor
- 208}
- 209
- 210dialog fotovisorx {
- 211 title "foto"
- 212 size %iwho.x %iwho.y 50 42
- 213 option dbu
- 214 icon 1, 1 1 48 40
- 215}
- 216
- 217on *:dialog:fotovisorx:sclick:1: {
- 218 dialog -x fotovisorx
- 219 set %iwho.x2 $calc($mouse.dx -200)
- 220 set %iwho.y2 $calc($mouse.dy -45)
- 221 dialog $iif($dialog(fotovisorx2),-x,-m) fotovisorx2 fotovisorx2
- 222 Fotovisor2
- 223}
- 224
- 225on *:dialog:fotovisorx:rclick:1: {
- 226 set %nickdecargafoto %nickdeluservisor
- 227 var %sancionadorfoto $?!="Quieres Denunciar a %nickdecargafoto por Foto Inadecuada $+ ?"
- 228 if (%sancionadorfoto) {
- 229 .msg denuncia denuncio %nickdecargafoto Foto Inadecuada.
- 230 else {
- 231 halt
- 232 }
- 233 }
- 234}
- 235
- 236on *:dialog:fotovisorx2:rclick:1: {
- 237 set %nickdecargafoto %nickdeluservisor
- 238 var %sancionadorfoto $?!="Quieres Denunciar a %nickdecargafoto por Foto Inadecuada $+ ?"
- 239 if (%sancionadorfoto) {
- 240 .msg denuncia denuncio %nickdecargafoto Foto Inadecuada.
- 241 else {
- 242 halt
- 243 }
- 244 }
- 245}
- 246
- 247alias Fotovisor2 {
- 248 set -u2 %hhsdq2x on
- 249 set %iwho.x2 $calc($mouse.dx -200)
- 250 set %iwho.y2 $calc($mouse.dy -150)
- 251 dialog $iif($dialog(fotovisorx2),-v,-m) fotovisorx2 fotovisorx2
- 252 dialog -t fotovisorx2 %nickdeluservisor
- 253 who %nickdeluservisor
- 254}
- 255
- 256dialog fotovisorx2 {
- 257 title "foto"
- 258 size %iwho.x2 %iwho.y2 130 130
- 259 option dbu
- 260 icon 1, 1 1 128 128
- 261}
- 262
- 263on *:EXIT: {
- 264 echo -s * [FotoMaton] Limpiando carpeta de imágenes por cierre...
- 265 .remove $qt($mircdirFotoMaton\*.jpg)
- 266 .remove $qt($mircdirFotoMaton\*.webp)
- 267 .remove $qt($mircdirFotoMaton\*.png)
- 268 .remove $qt($mircdirFotoMaton\*.gif)
- 269}
- 270
- 271on *:START: {
- 272 if ($isdir($mircdirFotoMaton\)) {
- 273 echo -s * [FotoMaton] Vaciando caché de imágenes al iniciar...
- 274 .remove $qt($mircdirFotoMaton\*.jpg)
- 275 .remove $qt($mircdirFotoMaton\*.webp)
- 276 .remove $qt($mircdirFotoMaton\*.png)
- 277 .remove $qt($mircdirFotoMaton\*.gif)
- 278 }
- 279}
- 280
- 281
- 282raw 802:*:{
- 283 if ($2 == modes) {
- 284 set %uix.modes $3-
- 285 }
- 286 if ($2 == snomasks) {
- 287 set %uix.snomasks $3-
- 288 }
- 289 if ($2 == nuh) {
- 290 set %uix.host $gettok($3,2,64)
- 291 }
- 292 if ($2 == onchans) {
- 293 set %uix.chans $3-
- 294 }
- 295 if ($2 == meta:score) {
- 296 set %uix.score $3-
- 297 }
- 298 halt
- 299}
- 300
- 301raw 317:*:{
- 302 set %uix.online $duration($calc($ctime - $4))
- 303 set %uix.idle $duration($3)
- 304 set %uix-on $asctime($4,dddd dd/mm/yyyy HH:nn:ss)
- 305}
- 306
- 307raw 354:*:{
- 308 if ($3 == $null) {
- 309 var %n = $2
- 310
- 311 if (%n) && (%n != %uix.nick) {
- 312 if (!$istok(%uix.clones.list,%n,44)) {
- 313 set %uix.clones.list %uix.clones.list $+ %n $+ ,
- 314 }
- 315 halt
- 316 }
- 317 halt
- 318 }
- 319 noop $1
- 320 if ($7 == %uix.target) {
- 321 set %uix.ident $3
- 322 set %uix.ip $4
- 323 set %uix.host $5
- 324 set %uix.server $6
- 325 set %uix.nick $7
- 326 set %uix.flags $8
- 327 set %uix.salto $9
- 328 set %uix.tidle $10
- 329 set %uix.account $11
- 330 set %uix.name $12-
- 331 UIX.parseFlags
- 332 unset %uix.clones.list
- 333 unset %uix.clones.text
- 334 set %uix.getclones 1
- 335 who %uix.ip i%n
- 336 .timeruixuix -m 1 500 UIX.fromWHO %uix.name
- 337 halt
- 338 return
- 339 }
- 340 halt
- 341}
- 342raw 315:*:{
- 343 if (%uix.getclones) {
- 344 unset %uix.getclones
- 345 var %i = 1
- 346 var %total = $numtok(%uix.clones.list,44)
- 347 var %txt
- 348 if (%total > 0) {
- 349 var %txt = Nick usados: $+ $crlf
- 350 while (%i <= %total) {
- 351 var %n = $gettok(%uix.clones.list,%i,44)
- 352 if (%n != %uix.nick) {
- 353 var %txt = %txt $+ %n $+ $crlf
- 354 }
- 355 inc %i
- 356 }
- 357 }
- 358 set %uix.clones.text %txt
- 359 if ($dialog(uix_img)) UIX.refresh
- 360 if ($dialog(uix_txt)) UIX.refreshTXT
- 361 haltdef
- 362 }
- 363}
- 364alias UIX.open {
- 365 set %poderio8 $active
- 366 if (%poderio8 == Status Window) { set %poderio8 "Status Window" }
- 367 window -a %poderio8
- 368 if (!$1-) return
- 369 if (!$exists($1-)) return
- 370 UIX.close
- 371 set %uix.img $1-
- 372 dialog -m uix_img uix_img
- 373 dialog -t uix_img %uix.nick
- 374 did -g uix_img 1 $qt(%uix.img)
- 375 var %txt
- 376 var %txt = %txt $+ Nick: %uix.nick $+ $crlf
- 377 var %txt = %txt $+ Ident: %uix.ident $+ $crlf
- 378 var %txt = %txt $+ Name: %uix.name $+ $crlf
- 379 var %txt = %txt $+ Ip: %uix.ip $+ $crlf
- 380 var %txt = %txt $+ Host: %uix.host $+ $crlf
- 381 var %txt = %txt $+ Server: %uix.server $+ $crlf
- 382 var %txt = %txt $+ Estado: %uix.reg $+ $crlf
- 383 var %txt = %txt $+ Nivel: %uix.oper $+ $crlf
- 384 var %txt = %txt $+ Estado: %uix.away $+ $crlf
- 385 var %txt = %txt $+ Flags: %uix.flags -- Tiempo Lag: %uix.tidle $+ $crlf
- 386 if (%uix.bot) var %txt = %txt $+ Tipo: %uix.bot $+ $crlf
- 387 if (%uix.account != 0) var %txt = %txt $+ Logeado en: %uix.account $+ $crlf
- 388 if (%uix.clones.list) var %txt = %txt $+ Nicks en uso: %uix.clones.list $+ %uix.nick $+ $crlf
- 389 var %txt = %txt $+ Modos: %uix.modes -- Mascaras: %uix.snomasks $+ $crlf
- 390 var %txt = %txt $+ Canales: %uix.chans $+ $crlf
- 391 var %txt = %txt $+ Online: %uix.online -- Idle: %uix.idle $+ $crlf
- 392 var %txt = %txt $+ Score: %uix.score
- 393 did -ra uix_img 2 %txt
- 394}
- 395
- 396alias UIX.openTXT {
- 397 set %poderio8 $active
- 398 if (%poderio8 == Status Window) { set %poderio8 "Status Window" }
- 399 window -a %poderio8
- 400 UIX.close
- 401 dialog -m uix_txt uix_txt
- 402 dialog -t uix_txt %uix.nick
- 403 var %txt
- 404 var %txt = %txt $+ Nick: %uix.nick $+ $crlf
- 405 var %txt = %txt $+ Ident: %uix.ident $+ $crlf
- 406 var %txt = %txt $+ Name: %uix.name $+ $crlf
- 407 var %txt = %txt $+ Ip: %uix.ip $+ $crlf
- 408 var %txt = %txt $+ Host: %uix.host $+ $crlf
- 409 var %txt = %txt $+ Server: %uix.server $+ $crlf
- 410 var %txt = %txt $+ Estado: %uix.reg $+ $crlf
- 411 var %txt = %txt $+ Nivel: %uix.oper $+ $crlf
- 412 var %txt = %txt $+ Estado: %uix.away $+ $crlf
- 413 var %txt = %txt $+ Flags: %uix.flags -- Tiempo Lag: %uix.tidle $+ $crlf
- 414 if (%uix.bot) var %txt = %txt $+ Tipo: %uix.bot $+ $crlf
- 415 if (%uix.account != 0) var %txt = %txt $+ Logeado en: %uix.account $+ $crlf
- 416 if (%uix.clones.list) var %txt = %txt $+ Nicks en uso: %uix.clones.list $+ %uix.nick $+ $crlf
- 417 var %txt = %txt $+ Modos: %uix.modes -- Mascaras: %uix.snomasks $+ $crlf
- 418 var %txt = %txt $+ Canales: %uix.chans $+ $crlf
- 419 var %txt = %txt $+ Online: %uix.online -- Idle: %uix.idle $+ $crlf
- 420 var %txt = %txt $+ Score: %uix.score
- 421 did -ra uix_txt 1 %txt
- 422}
- 423alias UIX.close {
- 424 if ($dialog(uix_img)) dialog -x uix_img
- 425 if ($dialog(uix_txt)) dialog -x uix_txt
- 426}
- 427dialog uix_img {
- 428 title "UserInfo"
- 429 size -1 -1 248 400
- 430 option dbu resize
- 431 icon 1, 1 1 246 210
- 432 edit "", 2, 4 215 242 180, multi read autovs vsbar
- 433 ;;text "", 2, 4 215 232 90
- 434}
- 435
- 436dialog uix_txt {
- 437 title "UserInfo"
- 438 size -1 -1 240 150
- 439 option dbu resize
- 440 edit "", 1, 4 4 232 140, multi read autovs vsbar
- 441 ;;text "", 1, 4 4 238 90
- 442}
- 443alias UIX.refresh {
- 444 set %poderio8 $active
- 445 if (%poderio8 == Status Window) { set %poderio8 "Status Window" }
- 446 window -a %poderio8
- 447 var %txt
- 448 var %txt = %txt $+ Nick: %uix.nick $+ $crlf
- 449 var %txt = %txt $+ Ident: %uix.ident $+ $crlf
- 450 var %txt = %txt $+ Name: %uix.name $+ $crlf
- 451 var %txt = %txt $+ Ip: %uix.ip $+ $crlf
- 452 var %txt = %txt $+ Host: %uix.host $+ $crlf
- 453 var %txt = %txt $+ Server: %uix.server $+ $crlf
- 454 var %txt = %txt $+ Estado: %uix.reg $+ $crlf
- 455 var %txt = %txt $+ Nivel: %uix.oper $+ $crlf
- 456 var %txt = %txt $+ Estado: %uix.away $+ $crlf
- 457 var %txt = %txt $+ Flags: %uix.flags -- Tiempo Lag: %uix.tidle $+ $crlf
- 458 if (%uix.bot) var %txt = %txt $+ Tipo: %uix.bot $+ $crlf
- 459 if (%uix.account != 0) var %txt = %txt $+ Logeado en: %uix.account $+ $crlf
- 460 if (%uix.clones.list) var %txt = %txt $+ Nicks en uso: %uix.clones.list $+ %uix.nick $+ $crlf
- 461 var %txt = %txt $+ Modos: %uix.modes -- Mascaras: %uix.snomasks $+ $crlf
- 462 var %txt = %txt $+ Canales: %uix.chans $+ $crlf
- 463 var %txt = %txt $+ Online: %uix.online -- Idle: %uix.idle $+ $crlf
- 464 var %txt = %txt $+ Score: %uix.score
- 465 did -ra uix_img 2 %txt
- 466}
- 467alias UIX.refreshTXT {
- 468 set %poderio8 $active
- 469 if (%poderio8 == Status Window) { set %poderio8 "Status Window" }
- 470 window -a %poderio8
- 471 var %txt
- 472 var %txt = %txt $+ Nick: %uix.nick $+ $crlf
- 473 var %txt = %txt $+ Ident: %uix.ident $+ $crlf
- 474 var %txt = %txt $+ Name: %uix.name $+ $crlf
- 475 var %txt = %txt $+ Ip: %uix.ip $+ $crlf
- 476 var %txt = %txt $+ Host: %uix.host $+ $crlf
- 477 var %txt = %txt $+ Server: %uix.server $+ $crlf
- 478 var %txt = %txt $+ Estado: %uix.reg $+ $crlf
- 479 var %txt = %txt $+ Nivel: %uix.oper $+ $crlf
- 480 var %txt = %txt $+ Estado: %uix.away $+ $crlf
- 481 var %txt = %txt $+ Flags: %uix.flags -- Tiempo Lag: %uix.tidle $+ $crlf
- 482 if (%uix.bot) var %txt = %txt $+ Tipo: %uix.bot $+ $crlf
- 483 if (%uix.account != 0) var %txt = %txt $+ Logeado en: %uix.account $+ $crlf
- 484 if (%uix.clones.list) var %txt = %txt $+ Nicks en uso: %uix.clones.list $+ %uix.nick $+ $crlf
- 485 var %txt = %txt $+ Modos: %uix.modes -- Mascaras: %uix.snomasks $+ $crlf
- 486 var %txt = %txt $+ Canales: %uix.chans $+ $crlf
- 487 var %txt = %txt $+ Online: %uix.online -- Idle: %uix.idle $+ $crlf
- 488 var %txt = %txt $+ Score: %uix.score
- 489 did -ra uix_txt 1 %txt
- 490}
- 491
- 492alias UIX.fromWHO {
- 493 var %raw = $1
- 494 var %dec = $decode( $+ %raw $+ , m)
- 495 if (($left(%raw,2) != I3) || ($len(%raw) < 35)) {
- 496 UIX.openTXT
- 497 return
- 498 }
- 499 var %ruta = $remove($gettok(%dec,4-,124),$chr(32))
- 500 if (!%ruta) {
- 501 UIX.openTXT
- 502 return
- 503 }
- 504 if (default.png isin %ruta) {
- 505 UIX.openTXT
- 506 return
- 507 }
- 508 UIX images.chateagratis.net $+ %ruta
- 509}
- 510
- 511alias UIX {
- 512 if (!$1) return
- 513 var %u = https:// $+ $remove($1,$chr(32)), %h = $gettok(%u, 2, 47), %p = $gettok(%u, 3-, 47)
- 514 var %n = $regsubex($gettok($gettok(%p, -1, 47), 1, 63),/[\\/|:?*"<>]/g,_), %dir = $mircdir $+ FotoMaton\
- 515 var %f = %dir $+ %n $+ .jpg, %f_fix = %dir $+ %n $+ _fix.jpg
- 516 if (!$isdir(%dir)) mkdir %dir
- 517 if ($exists(%f_fix)) { .timer $+ $ticks -m 1 50 UIX.open $qt(%f_fix) | return }
- 518 if ($exists(%f)) {
- 519 bread $qt(%f) 0 100 &h
- 520 if (RIFF isin $bvar(&h,1,100).text) { .remove $qt(%f) }
- 521 else { .timer $+ $ticks -m 1 50 UIX.open $qt(%f) | return }
- 522 }
- 523 if ($sock(uix_ $+ %n $+ *)) return
- 524 var %id = uix_ $+ %n $+ _ $+ $ticks
- 525 hadd -m %id f %f | hadd %id h %h | hadd %id p / $+ %p | hadd %id n %n
- 526 sockopen %id %h 80
- 527}
- 528on *:sockopen:uix_*:{
- 529 if ($sockerr) { if ($hget($sockname)) hfree $sockname | return }
- 530 sockwrite -n $sockname GET $hget($sockname,p) HTTP/1.1
- 531 sockwrite -n $sockname Host: $hget($sockname,h)
- 532 sockwrite -n $sockname User-Agent: Mozilla/5.0
- 533 sockwrite -n $sockname Connection: close
- 534 sockwrite -n $sockname $crlf
- 535}
- 536on *:sockread:uix_*:{
- 537 if (!$sock($sockname).mark) { var %h | sockread %h | if (!%h) sockmark $sockname 1 | return }
- 538 if ($hget($sockname,f_ok)) return
- 539 :next
- 540 sockread -f &d
- 541 if ($sockbr) {
- 542 var %f = $hget($sockname,f)
- 543 if (!$fopen($sockname)) .fopen -no $sockname $qt(%f)
- 544 .fwrite -b $sockname &d
- 545 if ($file(%f).size < 5000 && !$hget($sockname,db)) {
- 546 bread $qt(%f) 0 100 &h | hadd $sockname db 1
- 547 var %x = $bvar(&h,1,100).text
- 548 if (RIFF isin %x) { hadd $sockname webp 1 }
- 549 if (GIF89a isin %x) || (ANIM isin %x) { hadd $sockname anim 1 }
- 550 }
- 551 goto next
- 552 }
- 553}
- 554on *:sockclose:uix_*:{
- 555 if ($fopen($sockname)) .fclose $sockname
- 556 if ($hget($sockname)) {
- 557 var %f = $hget($sockname,f), %webp = $hget($sockname,webp), %t = $ticks
- 558 if (!$hget($sockname,f_ok) && %f && $exists(%f)) {
- 559 if (%webp) {
- 560 var %f_st = $replace(%f,.jpg,_st.webp), %f_fix = $replace(%f,.jpg,_fix.jpg)
- 561 .run -h $qt($mircdir $+ webpmux.exe) -get frame 2 $qt(%f) -o $qt(%f_st)
- 562 .timerCONV_ [ $+ [ %t ] ] -m 1 300 .run -h $qt($mircdir $+ dwebp.exe) $qt(%f_st) -o $qt(%f_fix)
- 563 .timerOPEN_ [ $+ [ %t ] ] -m 1 800 UIX.open $unsafe($qt(%f_fix))
- 564 }
- 565 else { .timer -m 1 150 UIX.open $unsafe($qt(%f)) }
- 566 }
- 567 hfree $sockname
- 568 }
- 569 .timerDEL_ $+ %t -m 1 60000 .remove $qt(%f)
- 570}
- 571alias UIX.scan {
- 572 if (!$1) return
- 573 unset %uix.clones
- 574 set %uix.target $1
- 575 who $1 n%tuihsnfdlar
- 576}
- 577alias UIX.parseFlags {
- 578 if (r isincs %uix.flags) set %uix.reg Registrado
- 579 else set %uix.reg No registrado
- 580 if (* isincs %uix.flags) set %uix.oper Operador
- 581 else set %uix.oper Usuario
- 582 if (G isincs %uix.flags) set %uix.away Ausente
- 583 else set %uix.away Disponible
- 584 if (B isincs %uix.flags) set %uix.bot Bot
- 585 else set %uix.bot Normal
- 586}
- 587
- 588
- 589on *:dialog:uix_img:rclick:1:{
- 590 if (%uix.nick) {
- 591 if ($input(¿Seguro que quieres hacer ZLINE a %uix.nick $+ ?, yn,Confirmación) == $true) {
- 592 zline %uix.nick 1d Foto Inadecuada.
- 593 }
- 594 }
- 595}
- 596
- 597on *:dialog:uix_img:dclick:1:{
- 598 if (%uix.nick) {
- 599 w %uix.nick
- 600 }
- 601}
Pasta cruda