please test this version using vars
erase the one you have
on $*:text:/^!slogan\s(.+)/iS:#:{
if (!%floods) {
$iif($sock(slogan), sockclose slogan)
sockopen slogan sloganmaker.com 80
set -u5 %maker $replace($regml(1),$chr(32),+)
set -u5 %channel $chan
inc -u3 %floods
}
else { .notice $nick You need to wait 3 seconds to trigger it again | return }
}
on *:sockopen:slogan:{
if ($sockerr) { msg %channel An error happenned with the server connection: $sock(slogan).wsmsg | sockclose slogan }
else {
var %x = sockwrite -nt $sockname, %slogan = $+(user=,%maker,&send=Make+a+Slogan%21)
%x POST /sloganmaker.php HTTP/1.1
%x HOST: sloganmaker.com
%x Connection: close
%x Content-Type: application/x-www-form-urlencoded
%x Content-Length: $len(%slogan)
%x $crlf $+ %slogan
}
}
on *:sockread:slogan:{
if ($sockerr) { msg %channel An error happenned with the server connection: $sock(slogan).wsmsg | sockclose slogan }
else {
sockread %x
if $regex(%x,/<p>(.+)<\/p><\/div>/) {
msg %channel $regml(1)
}
}
}