#quick script was bored............ #shouts to elf for the basic script i just rigged #it up for my needs, i think outz on the forum wanted #it too.. http://jircii.info/ # # #aliases: /listfriends /addfriend /remfriend # still need help? try the forum http://jircii.info/messageboard/ alias listfriends { local('@addresslist $name'); @addresslist = getPropertyList('myfriends'); # If you want the list to be sorted, add this line: # @addresslist = sorta(@addresslist); if (size(@addresslist) == 0) { echo("*** List is empty"); return; } echo("*** Listing query friends"); foreach $name (@addresslist) { echo(" $name"); } echo("*** End of List"); } alias addfriend { local('@addresslist $addr'); $addr = getAddress($1); if (!-istrue $addr) { echo("/addfriend: unknown host, sending who request to obtain address."); sendRaw("who $1"); return; } if (!-istrue $1) { echo("/addfriend: usage: /addfriend \bNICKNAME\b"); return; } @addresslist = getPropertyList('myfriends'); $mask = getAddress($1); push(@addresslist, $mask); setPropertyList('myfriends', @addresslist); echo("\c24***\b $addr \bhas been added to my friends list"); } alias remfriend { local('@addresslist $addr'); $addr = getAddress($1); @addresslist = getPropertyList('myfriends'); if (!-istrue $addr) { echo("/remfriend: address not in idl, sending who request to obtain address. try again. ( $+ $1 needs to be on the current irc server)"); sendRaw("who $1"); return; } if (!-istrue $1) { echo("/remfriend: usage: /remfriend \bNICKNAME\b (make sure user is online)"); return; } remove(@addresslist, $addr); setPropertyList('myfriends', @addresslist); echo("\c24***\b $addr \bhas been removed from my friends list"); } on msg { local('@addresslist $name $exempt $addr'); $addr = getAddress("$nick"); $lastblockednick = $nick; $lastblockedmsg = $1-; if (!-istrue $addr) { echo("nickname: $nick messsaged you... address not in idl, sending who request to obtain address"); echo("* press f9 to see message (only one saved at a time)"); sendRaw("who $nick"); return; } @addresslist = getPropertyList('myfriends'); foreach $addressitem (@addresslist) { if ($addressitem eq $addr) { $exempt = 1; } } if ($exempt != 1) { call("/msg $nick Sorry no messages allowed"); echo("* $nick messaged you but hostmask is not allowed, press f9 to see last message"); echo("Status", "* $nick messaged you: \"" . $1- . "\""); halt; } } bind F9 { echo("$lastblockednick said \"" . $lastblockedmsg . "\""); } menu nicklist { menu "msg-blocker" { # It's using $1- so that you can select multiple nicks. addItem("add allowed", "/addfriend $1-"); addItem("rem allowed", "/remfriend $1-"); addItem("list allowed", "/listfriends"); } }