;Channel Encryption By -Zeus- aka DaN_dA_mAn (http://haxor.2ya.com)
;Dan Gimme this to put on my script yeay! lol, nice idea Dan ;p
---------------------------------------------------------------------
;Ive gotta say, im feed up of that Daneel B|tch auto killin ppl for specfic text/ ;or when ya slagg MSN off.
;Heres the answer, a simple Encryption algorithm to Encrypt messages sent to the ;channel. (Took about 5 mins to throw together, nothing special.)
; This script will add an "Encryption Mode" popup to the main mIRC MenuBar.
; If the other users in the channel have this addon, they will receive the ;messages Decoded (as Normal) if not they wont have a clue what ya sayin :)
;
;The main uses i can think for this are :-
;1) Prevent MSN watching EVERYTHING you say in a chan
;2) To choose to only talk to other Scripters/others with this addon.
;3) To P|ss off the Web chat users, if you and a few other nicks are using it.


menu channel,menubar {
  -
  'Encryption Mode
  .$iif(%encryptmode == on,,$chr(32) ) On: set %encryptmode on
  .$iif(%encryptmode == off,,$chr(32) ) Off: set %encryptmode off
  .-
  .Unload: /unload -rs Encryption.txt
}

on *:LOAD:{
  echo -a 08,12 Encryption Loaded 
  echo -a 08,12 To enable select ON from the Menu 
  echo -a 08,12 Menus have been added to the mIRC toolbar, and Channel right click Popup 
}


;Decodes any Encrypted Messages [Don't edit, or it wont work]
on *:text:*`ZE`*:#: { 
  var %mess $2-
  var %text $decode(%mess,m)
  echo $chan 00,15  $nick Encrypted :-  %text
}

:Encodes input chan text, if encryption mode is on [Don't edit, or it wont work]
on *:input:#: {
  if (%encryptmode == on) {
    /haltdef
    var %text $1-
    var %encoded $encode(%text,m)
    privmsg $chan `ZE` %encoded
    echo $chan 00,14 $me Encoded :-  %text
  }
}
