/********************************************************* * Name: Melvin D. Nava * Website: http://mdnava.network.com.ve/ * E-mail: melvinnava@ifrance.com * Phone: 0414-6374337 * Location: Maracaibo, Venezuela ********************************************************** [2002.Oct.03 - JPilot Commands] ********************************************************** Feel free to use or modify this script to fit your needs If you need any help send me an Email and I'll be more than glad to help you out. If you think it have been useful to you and you own a website, I'll appreciate if you link back to my website ********************************************************** Puedes usar o modificar estos scripts libremente según tus necesidades. Si necesitas ayuda enviame un Correo y estaré mas que dispuesto de echarte una mano. Si crees que ha sido de ayuda y tienes un sitio Web, apreciare si haces un link de vuelta a mi sitio web. P.D.: todos mis programas siempre los comento en ingles. *********************************************************/ away = 'no'; /* if (document.images) { away_1 = new Image away_2 = new Image away_1.src = 'setaway.gif' away_2.src = 'setback.gif' } */ function setmsg (type) { msg = prompt("Enter your "+ type +" message here:", ""); if (msg != null) { return msg; } else { return false; } } function show_emotion(emotion) { document.Mchat.processJInput(emotion); } function change_nick() { nickname = prompt("Coloca tu nuevo Nickname", ""); if (nickname != null) { document.Mchat.processJInput("/nick " + nickname); } } function clear_screen() { document.Mchat.processJInput("/clear "); } function Mchat_do(type,action) { if (type == 'sclear') { document.Mchat.processJInput('/clear '); } if (type == 'time') { document.Mchat.processJInput('/ctcp %$HN time'); } if (type == 'version') { document.Mchat.processJInput('/ctcp %$HN version'); } if (type == 'whois') { document.Mchat.processJInput('/whois %$HN '); } if (type == 'ping') { document.Mchat.processJInput('/ctcp %$HN ping'); } if (type == 'memoserv') { if (action == 'send') { to = prompt('Who to send to?',''); if (to != null) { msg = prompt('Your msg to '+to+' ?',''); if (msg != null) { document.Mchat.processJInput('/msg memoserv send '+to +' '+msg ); } } } if (action == 'cancel') { to = prompt('Cancel memo to?',''); if (to != null) { document.Mchat.processJInput('/msg memoserv cancel '+to ); } } if (action == 'list') { document.Mchat.processJInput('/msg memoserv list'); } if (action == 'readlast') { document.Mchat.processJInput('/msg memoserv read last'); } if (action == 'read') { num = prompt('Memo to read?','1'); if (num != null) { document.Mchat.processJInput('/msg memoserv read '+num ); } } if (action == 'delete') { num = prompt('Memo to delete?','1'); if (num != null) { document.Mchat.processJInput('/msg memoserv del '+num ); } } if (action == 'delall') { doit = confirm('This will delete all saved memos are you sure?'); if (doit != false) { document.Mchat.processJInput('/msg memoserv del all'); } } if (action == 'setnotify') { when = prompt('When do you want to be notifyed that you have a new memo?\n options are: ON/LOGON/NEW/OFF','ON'); if (when != null) { document.Mchat.processJInput('/msg memoserv set notify '+when ); } } if (action == 'setlimit') { max = prompt('Max number of memos to recieve? max 20','20'); if (max != null) { if (max <= '20') { document.Mchat.processJInput('/msg memoserv set limit '+max ); } else { alert('You can set this to a maximum of 20'); } } } } if (type == 'chanserv') { if (action == 'register') { pass = prompt('Enter password',''); if (pass != null) { description = prompt('Description of your channel','My chan'); if (description != null) { document.Mchat.processJInput('/msg chanserv register #%$C '+ pass +' '+description); } } } if (action == 'identify') { pass = prompt('Enter password',''); if (pass != null) { document.Mchat.processJInput('/msg chanserv identify #%$C '+ pass ); } } if (action == 'drop') { doit = confirm('This will drop the registration of this channel are you sure?'); if (doit != false) { document.Mchat.processJInput('/msg chanserv DROP #%$C '); } } if (action == 'accesslist') { document.Mchat.processJInput('/msg chanserv access #%$C list'); } if (action == 'add') { nickname = prompt('enter nickname to add, must be a registered nickname',''); if (nickname != null) { level = prompt('Enter level:\n 3 = voice\n4 = halfop\n5 = op'); if (level != null) { document.Mchat.processJInput('/msg chanserv access #%$C add '+nickname +' '+level); } } } if (action == 'del') { nickname = prompt('enter nickname to delete',''); if (nickname != null) { document.Mchat.processJInput('/msg chanserv access #%$C del '+nickname ); } } } if (type == 'botserv') { if (action == 'list') { document.Mchat.processJInput('/msg botserv botlist'); } if (action == 'assign') { botnick = prompt('Enter botname to assign remember to do list bots to see avaliable bots','Atomiccat'); if (botnick != null) { document.Mchat.processJInput('/msg botserv assign #%$C '+botnick ); } } if (action == 'inassign') { botnick = prompt('Enter botname to unassign',''); if (botnick != null) { document.Mchat.processJInput('/msg botserv unassign #%$C '+botnick ); } } } if (type == 'join') { if (document.jform.channels.indexOf != '0') { if (document.jform.channels.options[document.jform.channels.selectedIndex].value != 'other') { document.Mchat.processJInput('/join '+ document.jform.channels.options[document.jform.channels.selectedIndex].value); return true; } else { chan = prompt('Channel to join','#mychannel'); if (chan != null) { if (chan.indexOf('#') != -1 ) { chan = '/join '+chan; } else { chan = '/join #'+chan; } document.Mchat.processJInput(chan); } } } document.jform.channels.selectedIndex = 0; } if (type == 'actions') { if (document.jform.actions.selectedIndex != '0') { if (document.jform.actions.options[document.jform.actions.selectedIndex].value != 'other') { document.Mchat.processJInput('/me '+ document.jform.actions.options[document.jform.actions.selectedIndex].value) } else { action = prompt('Action to perform','Smiles innocently'); if (action != null) { action = '/me '+action; document.Mchat.processJInput(action); } } } document.jform.actions.selectedIndex = 0; } if (type == 'limit') { action = prompt('Set limit to this, leave blank to unset',''); if (action != null) { if (action != '') { action = '/mode #%$C +l '+action; document.Mchat.processJInput(action); } else { document.Mchat.processJInput('/mode #%$C -l') } } } if (type == 'invite') { nick = prompt('Invite this person to channel',''); if (nick != null) { if (nick != '') { document.Mchat.processJInput('/invite '+nick +' #%$C '); } } } if (type == 'opmode') { document.Mchat.processJInput('/mode #%$C '+ action +' %$HN '); } if (type == 'cmode') { document.Mchat.processJInput('/mode #%$C '+ action ); } if (type == 'kick') { if (action == 'fast') { kickmsg = 'You Musta Done Something Wrong!'; } else { kickmsg = setmsg('kick'); } document.Mchat.processJInput('/kick #%$C %$HN '+ kickmsg); } if (type == 'kickban') { kickmsg = setmsg('kick'); if (kickmsg != false) { document.Mchat.processJInput('/mode #%$C +b %$HN '); document.Mchat.processJInput('/kick #%$C %$HN '+ kickmsg); } } if (type == 'away') { if (away == 'yes') { action = 'back' } if (away == 'no') { action = 'away' } if (action == 'away') { awaymsg = setmsg('away'); if (awaymsg != false) { document.Mchat.processJInput('/away ' + awaymsg); document.Mchat.processJInput('/me is AWAY \('+awaymsg+'\).'); away = 'yes'; document.away.src=away_2.src } } else { document.Mchat.processJInput('/away'); document.Mchat.processJInput('/me is BACK from being AWAY \('+awaymsg+'\).'); away = 'no'; document.away.src=away_1.src } } if (type == 'nickserv') { if (action == 'register') { nickpass = prompt('Enter your password',''); if (nickpass != null) { document.Mchat.processJInput('/msg nickserv register '+ nickpass); } } if (action == 'identify') { nickpass = prompt('Enter your password',''); document.Mchat.processJInput('/msg nickserv identify '+ nickpass); } if (action == 'ghost') { nickpass = prompt('Enter your password',''); if (nickpass != null) { nick = prompt('Enter your nickname to ghost',''); if (nick != null) { document.Mchat.processJInput('/msg nickserv ghost '+ nick +' ' +nickpass); } } } if (action == 'recover') { nickpass = prompt('Enter your password',''); if (nickpass != null) { nick = prompt('Enter your nickname to recover',''); if (nick != null) { document.Mchat.processJInput('/msg nickserv recover '+ nick +' ' +nickpass); } } } if (action == 'release') { nickpass = prompt('Enter your password',''); if (nickpass != null) { nick = prompt('Enter your nickname to release',''); if (nick != null) { document.Mchat.processJInput('/msg nickserv release '+ nick + ' ' +nickpass); } } } if (action == 'drop') { doit = confirm('This will drop the registration of your nickname are you sure?'); if (doit != false) { document.Mchat.processJInput('/msg nickserv drop '); } } if (action == 'setkill') { kill = prompt('Set kill on/off','on'); if (kill != null) { document.Mchat.processJInput('/msg nickserv set kill '+ kill ); } } if (action == 'setsecure') { kill = prompt('Set secure on/off','on'); if (kill != null) { document.Mchat.processJInput('/msg nickserv set secure '+ kill ); } } if (action == 'setpassword') { oldpass = prompt ('enter your current password',''); if (oldpass != null) { newpass = prompt ('enter new password',''); if (newpass != null) { document.Mchat.processJInput('/msg nickserv set password '+ oldpass +' '+ newpass ); } } } } }