Advertisement
sxiii

User Search Script by Hostname ID and Invite Him To Channel

Dec 25th, 2014
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.14 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ; This mIRC script lets you search users by hostname mask and make them join your channel
  3. ; You have to prepare file named "ids.txt" with hostname ids of people you like to join your channel
  4. ; Each hostname record has to start as newline. Put this file to the following directory:
  5. ; (Your hard drive where mIRC is installed)/users/(Your User Name)/Application Data/mIRC
  6. ; For example it might be the following file: C:/users/root/Application Data/mIRC/ids.txt
  7. ; To get simple hostname record run "/who yournick" in IRC to see your own hostname record
  8. ; Next, add the following script lines to the mIRC - Tools - Script editor (Alt+R) - Remote section
  9. ; After you add them at the bottom, please run the script like following:
  10. ; /usearch #channel-to-search #channel-to-invite
  11. ;                                                                written by Security XIII on 25.12.2014
  12. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  13.  
  14. ; custom alias "/usearch #channel-to-search #channel-to-invite"
  15. alias usearch {
  16.   ; request names list
  17.   names $$1
  18.   ; global variable storing the name of the channel to search and channel to invite
  19.   set -en %usearch $1
  20.   set -en %invitech $2
  21. }
  22.  
  23. ; names reply
  24. raw 353:*: {
  25.   ; reply is for the channel in question
  26.   if ($3 == %usearch) {
  27.     ; write names to file    
  28.     ;  write $v1 $+ .txt $4-
  29.     var %word = 1
  30.     while (%word <= $numtok($4-,32)) {
  31.       echo -a UserID: %word
  32.       who $gettok($4-,%word,32)
  33.       set %unick $gettok($4-,%word,32)
  34.       set %uaddr $address(%unick,0)
  35.       echo -a UserNick: %unick
  36.       echo -a UserAddress: %uaddr
  37.       while ($read(ids.txt, nw, %uaddr, $calc($readn + 1))) set %compare $v1
  38.       if (%uaddr == %compare) { SAJOIN %unick %invitech }
  39.       else { echo -a user hostname not found in list }
  40.       inc %word
  41.     }
  42.     ; halt default display
  43.     haltdef
  44.   }
  45. }
  46.  
  47. ; 'end of names' reply
  48. raw 366:*: {
  49.   ; reply is for the channel in question
  50.   if ($2 == %usearch) {
  51.     unset %usearch
  52.     haltdef
  53.   }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement