Yeah just in case I called it by the wrong name, I'm looking for an addon or snippet or something that when users join the msn room, it checks their profile, and if they're under a certain age kicks them. I need it to be adjustable because I have multiple rooms. Thanks ahead of time for any help.
This one checks age to see if under 18. If so they are kicked and banned. If no age is on profile they are kicked. If they use a false age like over 75 they are kicked.
,,,,,,,,Credit to [Ice] [Angel] Petertje Spike 1506 ,,,,,,,,,,,
menu * {
Profile Scan ( $+ $group(#profdtl) $+ )
.On:{ .enable #profdtl | echo -a 4..::Profile Scan Enabled::.. }
.Off:{ .disable #profdtl | echo -a 4..::Profile Scan Disabled::.. }
}
#profdtl on
on *:JOIN:*:{
if ($nick == $me) halt {
if (> isin $nick) halt {
set -u5 %pnick $nick
set -u6 %inpuid $+ [ $nick ] $true
set %pronick $nick
.sockwrite -tn msn.server. $+ $cid prop $nick PUID
timerclose 4 10 -c proread_clean $nick
}
}
}
alias proread_clean {
close -@Profile
remini PUID.ini PUID $1
remini PUID.ini Userget $1
remini PUID.ini Redirect $1
}
raw 818:*:{
if ($3 != MSNPROFILE) && (%inpuid $+ $2) {
unset %inpuid $+ $2
writeini -n PUID.ini PUID $2 $4
profile $2
}
}
alias profile { sockopen $+(profile.,$1) chat.msn.com 80 }
alias profileinfo {
if ($prop == puid) { return $gettok($right($gettok($1,3,47),-10),1,38) }
if ($prop == userget) { return $gettok($1,3,47) }
}
on *:SOCKOPEN:profile.*:{ sockwrite $sockname GET /profile.msnw?epuid= $+ $readini(PUID.ini,PUID,$gettok($sockname,2,46)) HTTP/1.1 $+ $crlf $+ Accept: */* $+ $crlf $+ Accept-Language: en-us $+ $crlf $+ User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) $+ $crlf $+ Host: chat.msn.com $+ $crlf $+ Connection: close $+ $crlf $+ $crlf }
on *:SOCKOPEN:profile2.*:{ sockwrite $sockname GET / $+ $readini(PUID.ini,UserGet,$gettok($sockname,2,46)) HTTP/1.1 $+ $crlf $+ Accept: */* $+ $crlf $+ Accept-Language: en-us $+ $crlf $+ User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) $+ $crlf $+ Host: members.msn.com $+ $crlf $+ Connection: close $+ $crlf $+ $crlf }
on *:SOCKREAD:profile.*:{
if ($sockerr > 0) return
var %t | sockread %t
while ($sockbr > 0) {
tokenize 32 %t
if ($1 == LOCATION:) {
writeini -n PUID.ini Redirect $gettok($sockname,2,46) $1-
writeini -n PUID.ini UserGet $gettok($sockname,2,46) $profileinfo($readini(PUID.ini,Redirect,$gettok($sockname,2,46))).userget
remini PUID.ini Redirect $gettok($sockname,2,46)
if (%rempuid == $null) { set %rempuid 0 }
inc %rempuid 1
if (%rempuid == 20) { remini PUID.ini PUID | remini PUID.ini Userget | set %rempuid 0 }
sockopen profile2. $+ $gettok($sockname,2,46) members.msn.com 80
return
}
sockread %t
}
}
on *:SOCKREAD:profile2.*:{
if ($sockerr > 0) return
var %x, %output
sockread %x
while ($sockbr > 0) {
$null($regsub(%x,/(<[^>]+>)/g,,%output))
if (*A class=viewDesc title* iswm %x) {
var %pro = $right(%x,$calc(1 - $poscs(%x,title=",1) - $len(title=")))
%pro = $left(%pro,$calc($pos(%pro,",1)-1))
echo $comchan($me,1) Homepage = %pro
if (*outwar* iswm %pro) {
.sockwrite -tn msn.server. $+ $right access $msn.get($cid,fullroom) add deny *! $+ $$ial($gettok($sockname,2,46) $+ *,1).addr 15 :Reclame in profiel
.sockwrite -tn msn.server. $+ $right kick $msn.get($cid,fullroom) $gettok($sockname,2,46) : $+ Porn Spam Kick | auser autok $nick
if (*room-project* iswm %pro) {
.sockwrite -tn msn.server. $+ $right access $msn.get($cid,fullroom) add deny *! $+ $$ial($gettok($sockname,2,46) $+ *,1).addr 15 :Reclame in profiel
.sockwrite -tn msn.server. $+ $right kick $msn.get($cid,fullroom) $gettok($sockname,2,46) : $+ Porn Spam Kick | auser autok $nick
if (*netcupid* iswm %pro) {
sockwrite -tn msn.server. $+ $right access $msn.get($cid,fullroom) add deny *! $+ $$ial($gettok($sockname,2,46) $+ *,1).addr 15 :Reclame in profiel
.sockwrite -tn msn.server. $+ $right kick $msn.get($cid,fullroom) $gettok($sockname,2,46) : $+ Porn Spam Kick | auser spamlist $nick
}
}
}
}
if (*class*viewName* iswm %x) {
echo $comchan($me,1) Nick in room = ( $+ $gettok($sockname,2,46) $+ ) Nick on Profile = ( $+ $remove(%output,$chr(9),$chr(32),& $+ nbsp,;) $+ )
}
if (*<B>Age</B>* iswm %x) {
var %age = $right(%output,- $+ $calc($poscs(%output,Age,1) + 2))
%age = $left(%age,$calc($pos(%age,$chr(9),1) -1))
if (%age < 18) {
.sockwrite -tn msn.server. $+ $right access $msn.get($cid,fullroom) add deny *! $+ $$ial($gettok($sockname,2,46) $+ *,1).addr 670 :Ageban
.sockwrite -tn msn.server. $+ $right kick $msn.get($cid,fullroom) $gettok($sockname,2,46) : This room is 18+
}
if (%age == Undisclosed) {
.sockwrite -tn msn.server. $+ $right access $msn.get($cid,fullroom) add deny *! $+ $$ial($gettok($sockname,2,46) $+ *,1).addr 15 :Ageban
.sockwrite -tn msn.server. $+ $right kick $msn.get($cid,fullroom) $gettok($sockname,2,46) : $+ You dont have an age on your profile !!! --[ Access ban 15 minutes ]--
}
if (%age > 75 ) {
.sockwrite -tn msn.server. $+ $right access $msn.get($cid,fullroom) add deny *! $+ $$ial($gettok($sockname,2,46) $+ *,1).addr 5 :Ageban
.sockwrite -tn msn.server. $+ $$right kick $msn.get($cid,fullroom) $gettok($sockname,2,46) : $+ (n)Sorry your a bit too old for this chatroom (n)
}
}
if (%nextgender) {
var %gender = $left(%output,$calc($poscs(%output,ale,1) + 2))
%gender = $right(%gender,- $+ $pos(%gender,$chr(9),0))
echo $comchan($me,1) Age = $iif(%age == $null,Unknown,%age) $+ , Gender = $iif(%gender == $null,Unknown,%gender)
echo $comchan($me,1) Location = $iif(%loc == $null,Unknown,%loc)
%nextgender = $false
}
if (*<B>Gender</B>* iswm %x) {
%nextgender = $true
}
sockread %x
}
}
#profdtl end
If you use multiple scripts for multiple rooms its very easy to change the numbers for the ages. ![]()
Edited to include CREDITS even tho none of these people ask for credits.
"Diplomacy is the art of saying 'Nice doggie' until you can find a rock".-Will Rogers
'ey creeping, u have to use Vincula with that to work
and i dont recommend to use it with another connection, replacing the sockets' names, coz u might get flooded out if ur connection sockets aint working properly
on me:*:join:#:hop #
I have a version fixed somewhat to work with white widow connection just everything doesnt work as of yet.
"Diplomacy is the art of saying 'Nice doggie' until you can find a rock".-Will Rogers
when posting code , can you put whos code it is pls , so people can add credits , if needed
My code does NOT have bugs. It just develops random features.
well thanks for the help. nothing works now. Kenobi, Hybrid Omega, Guarddog3.6 which I've had the most luck with, osmosis might work but is too complicated. I need a script that doesn't have one of those custom nicklists. although they work, they make my comp freeze for some reason. I always get disconnected now. I've refreshed the subinfo, I've updated, and done it a million times. this isn't fun.
Sign in to reply or start a new topic where your account has permission.