User:Topher208/chat.js

/* Ban users */ function banUser { var banuser = prompt('Please enter the user (case-sensitive) you want to ban.', ''); if (!$('#WikiChatList [data-user="' + banuser + '"]').length) { confirm(banuser + ' is not in this chat. Still try to ban that user?') ? mainRoom.ban({           name: banuser        }) : undefined; } else { mainRoom.ban({           name: banuser        }); } } $('Ban... ').prependTo('.Rail'); /* Kick users */ function kickUser { var kickuser = prompt('Please enter the user (case-sensitive) you want to kick.', ''); if (!$('#WikiChatList [data-user="' + kickuser + '"]').length) { confirm(kickuser + ' is not in this chat. Still try to kick that user?') ? mainRoom.kick({           name: kickuser        }) : undefined; } else { mainRoom.kick({           name: kickuser        }); } } $('Kick... ').prependTo('.Rail'); /* Private messaging */ function privateMessage { var users = prompt('Please enter the user or slash-separated users (case-sensitive) you want to private message.', ''); var users = users.split('/'); if (!$('#WikiChatList [data-user="' + users + '"]').length) { confirm(users + ' is not in this chat. Still try to private message that user(s)?') ? mainRoom.openPrivateChat(users)({           name: users        }) : undefined; } else { mainRoom.openPrivateChat(users)({           name: users        }); } } $('Private Message... ').prependTo('.Rail');