Skip to content

Commit

Permalink
Fixed @ identification and missed lang (Thanks to MatBuc)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lapotor authored and Lapotor committed Jul 12, 2018
1 parent 3035ec3 commit fb07ec5
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions scripts/custom/warnSys.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
function userStrings(user) {
var user_mention = "";
var user_string = "";
if (user.charAt(0) === "@"){
if (user.substr(0,1) == "@"){
user_mention = user;
user_string = user.substr(1);
} else {
Expand Down Expand Up @@ -82,14 +82,6 @@
$.consoleLn($.lang.get('warnsys.warn3.console', user[1]));
}

/**
* @function setLang
*
*/
function setLang() {

}

/**
* @event command
*/
Expand All @@ -99,8 +91,7 @@
var args = event.getArgs();
var reason = "";


if (args[0] != undefined || args[0] != null) {
if (args[0] !== undefined || args[0] != null) {
if ($.isBot(args[0]) || $.isMod(args[0]) || $.isOwner(args[0]) || $.isAdmin(args[0])) {
var user = 0x349;
} else {
Expand Down Expand Up @@ -150,7 +141,7 @@
$.say($.lang.get('warnsys.delall.twitch', user[1]));
$.consoleLn($.lang.get('warnsys.delall.console', user[1], sender));
} else {
$.say("@" + sender + " " + user[1] + " wurde noch nicht Verwarnt.");
$.say($.lang.get('warnsys.warn.none', sender, user[1]));
}
} else if ($.inidb.exists('warnSystem', user[1])) {
if ($.getIniDbNumber('warnSystem', user[1]) == 1) {
Expand Down

0 comments on commit fb07ec5

Please sign in to comment.