$address($1,[NUM]) for sockread

By astro on Sep 05, 2004

this alias will allow you to pass and return the address mask levels in sockread just like $address does

the basic levels are 0, returns whole string (without the :), 1 returns ident@whole.domain, 2 returns ident@*.domain, etc

basic usage could be

on :sockread:sock:{
sockread %sock1
tokenize 32 %sock1
if ($2 == PRIVMSG) {
if ($ident($1,2) == %addressmatchvariableorsomething) {
do some stuff here
}
}

alias ident {
  if ($2 == 0) { return $remove($1,:) }
  return $+(*,$gettok($gettok($1,2,33),1,64),@*.,$gettok($gettok($1,2,64),$2 -,46))
}

Comments

Sign in to comment.
[-Superboyz-]   -  Sep 10, 2004

nice !

 Respond  
astro   -  Sep 07, 2004

LOL fu syk1k man

 Respond  
syk1k   -  Sep 06, 2004

i reacon id sleep with u astro if u had some mcbreast meat

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.