Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions chat-plugins/flip.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
exports.commands = {
flip: function (target, room, user) {
var flipped = '';
if (!target) return this.parse("/help flip");
if (!this.canBroadcast()) return;
for (var count = target.length - 1; count >= 0; count--)
flipped += target[count];
return this.sendReplyBox('You input: ' + target + ' The result was: ' + flipped);
return this.sendReplyBox('You input: ' + target + ' The result was: ' + target.split("").reverse().join(""));
},
};