mIRC Home    About    Download    Register    News    Help

Active Threads | Unanswered Past 24 hours | Past 48 hours | Past Week | Past Month | Past Year
Scripts & Popups Jump to new posts
Re: Reading RSS pages with sockets favellado Yesterday at 03:21 PM
Below is a test of opening sockets, where several of them return HTTP different from 200. Being 400, 500, 30, among others...

If you open several of these pages in the external browser, they work normally, but not in the socket.

Note that in the /sockwrite code there is the possibility of passing the entire link or just the GET context after the main URL. When the entire link is passed and the HTTP return is 301, the return link location is duplicated with the main URL + the complete URL with a bug in http:(s)/ with only one slash.

I would like to know why in the browser and even $urlget the pages also work but in the socket these different returns occur.

To test, just run the /open.sw.run command and the messages will appear in the status window.

alias open.sw {
if ($1) {
var %sn $sockname, %s sockwrite -n %sn, %pg GET
%s %pg $+(/,$gettok($1,3-,47)) HTTP/1.0
;%s %pg $1 HTTP/1.0
%s Host: $gettok($1,2,47)
%s User-Agent: Mozilla/??
;%s User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
%s Accept: */*
%s Connection: close
%s $str($crlf,2)
}
}

alias open.sw.table return opensw

alias open.sw.table.add hadd $open.sw.table $+(open.sw-,$calc($hget($open.sw.table,0).item + 1)) $1

alias open.sw.run {
if ($hget($open.sw.table)) hfree $open.sw.table
hmake $open.sw.table 100
open.sw.table.add https://sistemas.ufrn.br/gerenciadorportais/public/labsis/noticia/rss/
open.sw.table.add https://www.tempo.com/feed/
open.sw.table.add https://leomedrado.com.br/feed/atom/
open.sw.table.add https://portal.nauticonet.com.br/feed/
open.sw.table.add https://www.clmbrasil.com.br/feed/atom/
open.sw.table.add https://cdn.bahianoticias.com.br/rss.xml
open.sw.table.add https://crusoe.com.br/feed/
open.sw.table.add https://areamilitar.com/feed/
open.sw.table.add https://piaui.folha.uol.com.br/feed/
open.sw.table.add https://cassiozirpoli.com.br/feed/
open.sw.table.add https://desinformante.com.br/feed/
open.sw.table.add https://jornalpara.com.br/rss/noticias
open.sw.table.add https://www.diariodoamapa.com.br/feed/
open.sw.table.add https://flamengorj.com.br/feed/
open.sw.table.add https://revistaflamenguista.com.br/feed/
open.sw.table.add https://www.correio24horas.com.br/rss
open.sw.table.add https://www.osul.com.br/feed
open.sw.table.add https://www.searanews.com.br/feed/
open.sw.table.add https://jornaldematogrosso.com.br/feed
open.sw.table.add https://www.correiobraziliense.com.br/feed

open.sw.next
}

alias open.sw.next {
var %sum $iif($1,1,0), %s1 $iif(%sum,$1,open.sw-1)
if ($2) echo -s %s1 (OFFLINE) $hget($open.sw.table,%s1) $2-
sockclose %s1
var %nn $calc($gettok(%s1,2,45) + %sum), %sn $+(open.sw-,%nn), %slc $hget($open.sw.table,%sn), %sl $gettok(%slc,2,47)
if (%sl) {
var %p $iif(https isin %slc,443,80), %e $iif(%p == 443,e)
sockclose %sn
sockopen $+(-a,%e) %sn %sl %p
}
else hfree $open.sw.table
}

on *:sockopen:open.sw-*:{
if ($sock($sockname).status != active) || ($sockerr) open.sw.next $sockname $sockerr $sock($sockname).wsmsg
else open.sw $hget($open.sw.table,$sockname)
}

on *:sockclose:open.sw-*:open.sw.next $sockname

on *:sockread:open.sw-*:{
sockread $+(&,$sockname)
breplace $+(&,$sockname) 13 32 10 32 30 32 155 32 12 32 9 32 11 32
var %a $bvar($+(&,$sockname),1,$bvar($+(&,$sockname),0)).text
if (location: isin %a) echo -s $sockname $left(%a,550)
if (HTTP/1. isin %a) {
echo -s  $+ $sockname $gettok(%a,1-2,32) $hget($open.sw.table,$sockname)
open.sw.next $sockname
}
}
1 79 Read More
Scripts & Popups Jump to new posts
Re: a amount of times a person has joined a channel Epic Yesterday at 06:25 AM
I have created a small script code for you. Try using it:
Code
on *:JOIN:#test:{
  if ($read($ctfile,ntw,$nick *)) {
    var %rn $readn, %count $gettok($read($ctfile,nt,%rn),2,32)
    write $+(-l,%rn) $ctfile $nick $calc(%count + 1)
  }
  else { write -i $ctfile $nick 1 }
}

alias -l ctfile { return channeltracker.txt }
2 108 Read More
Developers Jump to new posts
Re: Spotify now-playing for mIRC turbosmurfen 30/06/25 02:16 PM
I have updated Spoton to version 1.2.1 on GitHub. With source code changes and a minor fix on the mIRC Addon.

I will tell you guys. I'm going to learn me more about C++ so I can release a new release with many fixes.
I have noticed since I'm a Premium user, that Spotify DJ deliver different messages to the Spotify Window.
Which will make messages as song to pm or channels. If using a timer that spams out messages.

I will also continue to update my knowledge in C++. By following courses.
I took a step from this, but I need to know more about C++ to deliver what I want for this project.

I want that my project should have better error support. And also other fixes and code cleanup.
I want to take a step with fixing maybe memory leaks (Not found so far) and vulnerable's (Found some).

If you guys ever want to report anything or maybe want a request use this Forum or use GitHub.

Anyways guys have a nice summer.
30 40,865 Read More
General Discussion Jump to new posts
Re: Locked Forground Sunlily 29/06/25 09:09 PM
Thank you so much! This resolved the issue for me. I've spent 2 days going through my laptop unable to figure out what the issue was...seriously thank you.
5 3,966 Read More
Scripts & Popups Jump to new posts
BADWORD IN MASK Fernet 27/06/25 03:14 PM
Hello, I noticed there're users who join in my channel with badword included in mask.
Example:

NICK is BADWORD@etc.....

Is possible to have an addon that kick/ban an user who use BADWORD in its mask?
Thanks
0 45 Read More