Re: Reading RSS pages with sockets
favellado
02/07/25 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
123
Read More
|
|
Re: a amount of times a person has joined a channel
Epic
02/07/25 06:25 AM
I have created a small script code for you. Try using it:
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
157
Read More
|
|
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
41,060
Read More
|
|
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,992
Read More
|
|
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
61
Read More
|
|
Re: oidentd
BhaaL
11/06/25 03:58 PM
It already does. Options, Connect > Identd. You will have to open/forward a few ports if you're behind a router for this to work, though. And oidentd is just one implementation of an identd, it's a specific application rather than the concept
1
875
Read More
|
|
command /script
fir3fox
08/06/25 07:47 PM
Hi, someone told me /script should show me what script file and .ini files my mirc have read and using, and its should be built comamnd from start, /script unkown command is that a normal behavour or I miss something here ?
//fir3fox
0
285
Read More
|
|
Re: /idle is very nosy. (by raccoon)
Wims
03/06/25 06:48 PM
$chr(32) can be added to the $+() and it is still shorter that way, the trailing space should be gone by itself because you're using a variable assignment which doesn't store single trailing space.
12
15,070
Read More
|
|
whois help me
abi
03/06/25 12:57 PM
Hello, I tried to make a script but when I tried not to produce special whois only on the query without having to display anywhere either the status channel or any but had to be query only query raw &311:*:{ echo -a $timestamp 13( 0whois $2 13 ) | echo -a $timestamp 12| 0nick:14 $2 | echo -a $timestamp 12| 0name:14 ( $+ $6- $+ ) | echo -a $timestamp 12| 0hostname:14 $3 $+ @ $+ $4 | halt } raw &314:*:echo -a $timestamp 12| 0name:14 $2- | halt raw &312:*:echo -a $timestamp 12| 0server:14 $3 ( $+ $4- $+ ) 0IP:12 $serverip | halt raw &369:*:echo -a $timestamp 12| 0whowas:14 $2- | halt raw &379:*:echo -a $timestamp 12| 0using modes:14 $6- | halt raw &307:*:echo -a $timestamp 12| 0registered nick:14 Yes | halt raw &319:*:echo -a $timestamp 12| 0channels:14 $3- | halt raw &313:*:echo -a $timestamp 12| 0oper status:12 $5- | halt raw &671:*:echo -a $timestamp 12| 0SSL:12 $4- | halt raw &310:*:echo -a $timestamp 12| 0raw info:12 $4- | halt raw &320:*:echo -a $timestamp 12| 0raw info:12 $3- | halt raw &330:*:echo -a $timestamp 12| 0raw info:12 $4- | halt raw &317:*:echo -a $timestamp 12| 0idle:14 $duration($3) | halt raw &301:*:echo -a $timestamp 12| 0away:14 $3- | halt raw &318:*:echo -a $timestamp 13( 0end whois $2 13 ) | halt raw &378:*:{ haltdef var %host = $remove($6,*@) hadd -mu1800 userhost $2 %host if $longip(%host) { echo -a $timestamp 12| 0real IP:12 $6 return } if $hget(iptable,%host) { echo -a $timestamp 12| 0real Host:12 $6 0real IP:12 $ifmatch return } echo -a $timestamp 12| 0real Host:12 $6 0Getting IP... hadd -m iptable %host 0 .dns -h %host }
On *:dns:{ if $hget(iptable,$dns(1).addr) == 0 { hadd -mu1800 iptable $dns(1).addr $iif($dns(1).ip,$ifmatch,Unresolved) halt } echo -a $timestamp 13> 11dns12 [13!12] var %n = $dns(0) if (!$dns(0)) { echo -a $timestamp 12.11.13. 11Resolve 4Failed } while (%n > 0) { echo -a $timestamp 12.11.13. 11Resolved 12: 13[12 $+ $dns(%n).addr $+ 13]12 To 13[12 $+ $dns(%n).ip $+ 13] $iif($dns(%n).nick != $null, 13[12 $+ $dns(%n).nick $+ 13]) | HALTDEF dec %n } }
alias listip { var %i = $hget(userhost,0).item window -t20,40 @listip while %i { var %nick = $hget(userhost,%i).item, %ip = $hget(userhost,%nick), %i = %i - 1 if $hget(iptable,%ip) { var %host = %ip, %ip = $ifmatch } aline @listip $+(Nick: %nick,$chr(9),IP: %ip,$chr(9),$iif(%host,Host: %host,Unresolved)) } }
0
424
Read More
|
|
BADWORD with EXCEPTIONS
Fernet
03/06/25 12:13 PM
Hello. I'm making changes to this addon that kicks/bans a user if they use any words included in a badwords.txt file. I would like to add a line so that some words included in a sentence are excepted. These excepted words are included in an exceptions.txt file. For example: -If a sentence contains dick (that is a badword) , you are kicked. But the word DICK (not allowed) is also part of DICKENS (allowed). So the word DICKENS is included in the exceptions. But a user could write "YOU_ARE_A_DICKHEAD_GUY", so I inluded *DICK*. Any word that include DICK/DICKS but not vulgar, are included in the exceptions (for example DICKENS, MOBY_DICK, etc...) -Or if someone spam with "http" or "https", must be kicked/banned, so I add *HTTP* to the badwords, but in the exceptions I add for example *http://www.miositoweb*, or *https://www.mioforum* (I'm not spamming, those links are fake)
on *:text:*:#CHANNEL:{
if ($nick !isop #) && ($nick !ishop #) && ($nick !isvoice #) {
$bad($1-)
}
}
alias bad {
var %o 1
while (%o <= $lines(badwords\badwords.txt)) {
;============ WHAT I ADDED =======
if ($read(badwords\eccezioni.txt, %o) iswm $1- ) && (%bad [ $+ [ $nick ] ] == $nick) { halt }
;===============================
if ($read(badwords\badwords.txt, %o) iswm $1- ) && (%bad [ $+ [ $nick ] ] == $nick) {
ban -u3600 #CHANNEL $address($nick,2) | write $mircdir $+ banemule.txt *Badwords* $date $time $nick ---> $address
kick #CHANNEL $nick BAN REASON
unset %bad [ $+ [ $nick ] ]
}
elseif ($read(badwords\badwords.txt, %o) iswm $1- ) {
kick #CHANNEL $nick WRITING $read(badwords\badwords.txt, %o) NOT ALLOWED. NEXT IS BAN
set %bad [ $+ [ $nick ] ] $nick
.timer 1 300 unset %bad [ $+ [ $nick ] ]
}
inc %o
}
}
The addon works, except that it doesn't consider exceptions and also kick/bans words included in exceptions.txt. Where is my mistake? Thanks for help
0
434
Read More
|
|
Re: Help with Code
abi
31/05/25 04:17 AM
Hi all! This´s "my" final Code. It´s Ok, perfect! Thanks for all!
on *:part:#:{
if *.MindForge.org !iswm $site {
set -eu3600 %Previous $+ $nick $site
}
}
on *:QUIT:{
if *.MindForge.org !iswm $site {
set -eu3600 %Previous $+ $nick $site
}
}
on *:KICK:#:{
if *.MindForge.org !iswm $gettok($address($knick,1),2,64) {
set -eu3600 %Previous $+ $knick $gettok($address($knick,1),2,64)
}
}
;========================================================
ON ^*:JOIN:#:{
If $nick == $me { echo $chan $timestamp * Join on $chan | haltdef | halt }
else {
var %i = 0
while (%i <= $var($eval(% $+ Previous $+ *),0)) {
inc %i
if ($site == $var($eval(% $+ Previous $+ *),%i).value) {
if ($nick != $remove($var($eval(% $+ Previous $+ *),%i),$chr(37),Previous)) {
echo $chan $timestamp * $nick ( $replace( $+ $address $+ ,@,12@) 12) has joined (14joined previously as $remove($var($eval(% $+ Previous $+ *),%i),$chr(37),Previous) $+ )
splay Notify
goto end
}
}
}
echo $chan $timestamp * $nick ( $replace( $+ $address $+ ,@,12@) ) has joined
}
:end
haltdef
}
;========================================================
on *:DISCONNECT:{
unset %Previous*
}
Thanks very much again Nice day  i get error /splay: no such file 'Notify' (line 26, test.mrc)
19
31,146
Read More
|
|
Re: login conect script
Iire
22/05/25 11:55 AM
Hello, I'm noticing two things in your on NOTICE event, (and one minor thing in your /prelogin alias): For the /prelogin alias, ($network) will be treated as plain text, rather than as the identifier $network surrounded by parentheses. In order to get the network name wrapped in parentheses, you will need to use a $+ concatenator (preferably the infix version) between each " (" and " )" parenthesis and the $network identifier: ( $+ $network $+ ) As for the on NOTICE event issues... The first thing I see there is that you have an extra event parameter: on *:NOTICE:*You are now identified* :* :NickServ:{ If you remove the part underlined in red, the event should trigger correctly and will no longer attempt to execute " /NickServ:{ " as a command whenever anybody sends you a notice containing the text " You are now identified". The second, which I'm assuming is a typo, is that you're checking if the value of $server is irc.misiochat.net, without a g... if ($server == irc. misiochat .net) { ...rather than irc.gmisiochat.net, with a g. Other than those two things, your script should work fine. However, you should also be aware that timers will evaluate identifiers and variables used in their command parameter twice: once when the /timer command itself is encountered and the timer is created, and then again when that timer is actually executed and runs the command you've passed to it. Although this is unlikely to be an issue for your particular case, you should get into the habit of wrapping any identifiers or variables that you use within a timer's command parameter inside the $unsafe() identifier in order to prevent mIRC from attempting to evaluate them twice. (Imagine, for instance, what might happen if any of your passwords began with a $ or % character.) So .timerNickServ 1 3 msg NickServ IDENTIFY $ns_pass ...would become: .timerNickServ 1 3 msg NickServ IDENTIFY $unsafe( $ns_pass ) And .timerOper 1 1 OPER $oper_user $oper_pass ...would become: .timerOper 1 1 OPER $unsafe( $oper_user $oper_pass ) Hope this helps.
1
737
Read More
|
|
Re: InspIRCd numeric 650 and "Services Message".
Khaled
18/05/25 01:43 PM
Thanks for your bug report. As far as I can tell, this is behaving as expected.
mIRC added support for DALnet's numerics 650 and 651 in 2002.
When mIRC sees numeric 650, it assumes that one or more service messages will follow, so it plays a single notice event sound, displays the message "Services Message" in reverse (as requested by users at the time), and then displays a list of incoming services messages. When it receives numeric 651, this indicates the end of the group of related services messages.
That said, it looks like InspIRCd does not send numeric 651, which means that mIRC cannot tell when the services messages group has ended.
I am going to change the implementation of this to be less dependent on receiving numeric 651. This change should be in the next beta.
1
1,129
Read More
|
|
Underscores
RoCk
11/05/25 03:09 PM
There is the option to fill spaces for sending files, could you add the option to remove underscores when receiving files? I have a script to do just that, but I help a lot of users who get confused with scripts. Thanks!
0
500
Read More
|
|
Re: Upper case nick
Simo
11/05/25 11:37 AM
on !*:JOIN:#:{
if (!$Timer($+(CheckNicks,.,$network,.,$chan,.,$nick))) { .Timer $+ $+(CheckNicks,.,$network,.,$chan,.,$nick) -md 1 750 badnick_alias $unsafe($chan) $nick }
}
ON *:nick:{
haltdef
var %whloop = 1
while ( $comchan($newnick,%whloop) != $null ) {
var %chan $v1
if (!$nick(%chan,$newnick,@&~%) && $nick(%chan,$me,@&~%)) { badnick_alias %chan $newnick }
inc %whloop
}
halt
}
ON *:op:#:{
if ($opnick == $me) {
var %loop = 1, %nick , %kickmsg = please change your nick thank you....
while (%loop <= $nick($chan,0)) {
%nick = $nick($chan,%loop)
if ($len( %nick ) < 3 || ($calc($regex(%nick,/[A-Z]/g) * 100 / $len(%nick)) > 30)) {
if (!$nick($chan,%nick,~&@%+)) { var %banmask = $addtok(%banmask,$MuteBanMask(%nick),32) }
if ($numtok(%banmask,32) == 10) { mode $chan + $+ $str(b,$numtok(%banmask,32)) %banmask | unset %banmask }
}
inc %loop 1
}
}
if (%banmask) { mode %chan + $+ $str(b,$numtok(%banmask,32)) %banmask }
}
Alias MuteBanMask { return ~q: $+ $address($1,2) }
alias badnick_alias {
var %chan $1 , %nick $2
if (%nick !ison %chan || $nick( %chan , %nick ,@&~%)) { halt }
if ($len( %nick ) < 3 || ($calc($regex(%nick,/[A-Z]/g) * 100 / $len(%nick)) > 30)) {
if (!$Timer($+(CheckNickZ,.,$network,.,%chan,.,%nick))) {
.Timer $+ $+(CheckNickZ,.,$network,.,%chan,.,%nick) 3 15 badnick_still_on_chan $unsafe(%chan) %nick
}
}
}
alias badnick_still_on_chan {
inc $+(%,CheckWarnings,.,$network,.,$1,.,$2)
if ($2 ison $1 && $($+(%,CheckWarnings,.,$network,.,$1,.,$2),2) < 3) { NOTICE $2 WARNING }
elseif ($($+(%,CheckWarnings,.,$network,.,$1,.,$2),2) == 3 && $2 ison $1 ) { if ($MuteBanMask($2) !isban $1) { mode $1 +b $MuteBanMask($2) } | .Timer $+ $+(CheckNickZ,.,$network,.,$1,.,$2) off | unset % $+ $+(CheckWarnings,.,$network,.,$1,.,$2) }
elseif ($2 !ison $1) { .Timer $+ $+(CheckNickZ,.,$network,.,$1,.,$2) off | unset $eval($+(%,CheckWarnings,.,$network,.,$1,.,$2),1) }
}
29
15,248
Read More
|
|
Re: Join flood protection
Simo
10/05/25 11:27 AM
yes u can by changing :
if (%wildsite !isban %chan) { mode %chan +b %wildsite }
to
if (%wildsite !isban %chan) { ban -u $+ $duration(3h) %chan %nick 2 }
22
39,549
Read More
|
|
|
|