mircscripting.info Forum Index mircscripting.info
#mIRCscripting Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Common channels alias

 
Post new topic   Reply to topic    mircscripting.info Forum Index -> Snippets
View previous topic :: View next topic  
Author Message
demeteor
Quite Active


Joined: 31 Jan 2008
Posts: 29

PostPosted: Thu Jan 31, 2008 12:51 pm    Post subject: Common channels alias Reply with quote

How to use:
/scomchans <nick>
And you should get on Echo that is saying your commom channels with <nick >



Code:
Code:
alias scomchans {
  var %nchan = 1
  unset %comchans
  while (%nchan <= $comchan($1,0)) {
    set %comchans %comchans $comchan($1,%nchan)
    inc %nchan
  }
  echo -a Common channels with $1 $+ : %comchans
}

_________________
-Meteor
Back to top
View user's profile Send private message
Ook
Major


Joined: 01 May 2004
Posts: 68

PostPosted: Fri Feb 01, 2008 4:17 pm    Post subject: Reply with quote

Code:

alias scomchans {
  var %nchan = 1, %comchans
  while ($comchan($1,%nchan) != $null) {
    var %c = $v1
    if ($calc($len(%comchans) + $len(%c)) > 850) {
      echo -a Common channels with $1 $+ : %comchans
      var %comchans = %c
    }
    else var %comchans = $addtok(%comchans,%c,32)
    inc %nchan
  }
  echo -a Common channels with $1 $+ : %comchans
}


This one handles line too long.
Back to top
View user's profile Send private message
demeteor
Quite Active


Joined: 31 Jan 2008
Posts: 29

PostPosted: Sun Feb 03, 2008 7:44 am    Post subject: Reply with quote

yeah thanks for the correction i have not added any validation rules :/
_________________
-Meteor
Back to top
View user's profile Send private message
SplitFire
Quite Active


Joined: 24 Jan 2008
Posts: 30
Location: Neverlands

PostPosted: Wed Dec 16, 2009 7:17 am    Post subject: Reply with quote

Code:
alias comchans {
  var %meh $1
  return $regsubex($str($chr(44),$comchan($me,0)),/./g,$+($comchan(%meh,\n),$chr(32)))
}


Cool--~
_________________
boo.. and stuff.
Back to top
View user's profile Send private message Visit poster's website
Josh
earlybird


Joined: 19 Oct 2008
Posts: 9
Location: Ontario, Canada

PostPosted: Sun Dec 20, 2009 4:06 pm    Post subject: Reply with quote

SplitFire wrote:
Code:
alias comchans {
  var %meh $1
  return $regsubex($str($chr(44),$comchan($me,0)),/./g,$+($comchan(%meh,\n),$chr(32)))
}


Cool--~


Code:

alias comchans return $regsubex($str(.,$comchan($$1,0)),/./g,$comchan( [ $$1 ] , \n ) $chr(32))

_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    mircscripting.info Forum Index -> Snippets All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group