Public paste
Undefined
By: script | Date: Nov 6 2009 20:50 | Format: None | Expires: never | Size: 2.48 KB | Hits: 479

  1. On @*:JOIN:#{Fredieking}: {
  2.   if ($read(invite.smembers.txt, s, $address($nick,2)) != $null) {
  3.     /invite $nick #Fredieking.hidden
  4.     /notice $nick You have been invited to #Fredieking.hidden- write        
  5.     /join #Fredieking.hidden to join the channel!
  6.   }
  7.   else {  
  8.   /mode $chan +v $nick }
  9. }
  10. ;the above section checks the access list named members.txt to
  11. ;see if the person entering the public channel has a known hostname
  12. ;and should be autoinvited to the members channel
  13. ;members.txt is created when the first member is added and resides
  14. ;in the main irc client folder
  15. ;Does not always work because of possible delay between joining a
  16. ;irc server and identifying of the persons nick with nickserv
  17.  
  18. on @*:TEXT:!Member *:#Fredieking: {
  19.   write -s $+ $address($$2,2) invite.smembers.txt $address($$2,2) $$2
  20.   /msg $chan  $$2 has been added to the list of Friends!
  21. }
  22. ;This peice of code monitors #schan for the !member trigger
  23. ;Proper useage is !member nick of person being added to members
  24. ;Persons nick is written to members.txt along with their hostname
  25. ;Person can change their nick all they want and as long as hostname ;matches the entry in members.txt they will be allowed access to
  26. ;the members channel upon usage of the !invite trigger
  27. ;Multiple channels can be specified for the bot to listen on but bot
  28. ;must also be in those channels to see the trigger
  29. ;500 refers to authorised bot admins that are specified in the "users"
  30. ;section of the mirc scripts editor as
  31. ;500:*!*@James.users.barafranca.com
  32. ;Adjust for hostmask display on the irc server you are using
  33.  
  34.  
  35. on @*:TEXT:!Remove *:#Fredieking:{
  36.   write -ds $+ $address($$2,2) invite.smembers.txt
  37.   /msg $chan  $$2 has been removed from the list of Friends!
  38. }
  39. ;Does the reverse of the !member command and removes a persons
  40. ;entry from the access list.
  41.  
  42.  
  43. on *:TEXT:!Invite*:#Fredieking: {
  44.   if ($read(invite.smembers.txt, s, $address($nick,2)) != $null) {
  45.     /invite $nick #Fredieking.hidden
  46.  
  47.   }
  48.   else { msg $chan  $nick you're not on the members list! }
  49. }
  50. ;This code listens for the !invite trigger on the channels you specify
  51. ;When the member desires to enter the restricted channel they
  52. ;simply type !invite in the specified public channel or channels
  53. ;This part of the script compares the users hostmask to that
  54. ;contained in members.txt and if user is on the list and invite is
  55. ;issued by the bot to the member.
  56. ;If the entry is not found then the bot publicly displays a refusal
  57. ;message  }