Stable/ChatPlugins/Modules/multiPM

chatPlugins.modules.multiPM.open = function { var $multiPMWindowHTML = $.showCustomModal( "MultiPM", ' Select the users you would like to PM:  ', {	      id: "multiPMWindow",	      width: 400,	      buttons: [		  {		  id: "cancel",		  message: "Cancel",		  handler: function  {		    chatPlugins.modules.multiPM.cancel;		    }		  },		  {		  id: "chatPlugins.modules.multiPM.start",		  defaultButton: true,		  message: "Start",		  handler: function  {		    chatPlugins.modules.multiPM.start;		    }		  }	      ]	}); $(".close").click(chatPlugins.modules.multiPM.cancel); $('body').append(' '); multiPMUserTable = "" for (i=0;i ' + mainRoom.model.users._byCid[Object.keys(mainRoom.model.users._byCid)[i]].attributes.name + ' '; multiPMUserTable += ' '; }	else { multiPMUserTable += ' '; multiPMUserTable += ' ' + mainRoom.model.users._byCid[Object.keys(mainRoom.model.users._byCid)[i]].attributes.name + ' '; } }	if ((Object.keys(mainRoom.model.users._byCid).length % 2)!=1) { multiPMUserTable += ' '; }	$('#multiPMUserTable').append(multiPMUserTable); } chatPlugins.modules.multiPM.cancel = function { $('#multiPMWindow').remove; $('.blackout').remove; } chatPlugins.modules.multiPM.start = function { if ($(".multiPMUser:checked").length == 0) { $("#multiPMHeader").css("color", "red").css("font-weight", "bold"); return; }	else { users = []; for (i=0;i<$(".multiPMUser:checked").length;i++) { users.push($(".multiPMUser:checked")[i].value); }		mainRoom.openPrivateChat(users); chatPlugins.modules.multiPM.cancel; } } if( !$("#multiPMButton").length ) { $("div.chattopic").append(' •  multi pm '); } $("#multiPMButton").click(chatPlugins.modules.multiPM.open);

console.log("[OPTIONS] multiPM: Loaded");