chatter.sk

Created by yea rite

Other available versions. Ordered by newest to oldest versions:

Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.

# INFO:
# Author: AVeryBadName
# Version: 4
# Discord: https://discord.gg/wPcnhK7mjZ
#
# Permissions:
# chatter.chatlog - chat log related features
# chatter.admin - global chat muting, filter editing, chat clearing
# chatter.report - player reporting
# chatter.report.review - report viewing
# chatter.ban - banning players
# chatter.mute - muting players
# chatter.freeze - freezing players
# chatter.alts - alt tracking  
# +3 created in options/config - chat cooldown related
#
#Commands /chatter, /filter, /clearmute, /clearchat, /mutechat, /chatlogclear, /chatlog, /report, /ban, /unban, /mute, /ipban and /freeze  
#
# If you find any bugs / exploits or have any feedback message ABadName#3227 on discord or join my server
# Chatter was made to work without any addons, so if you have any errors its very likely to be caused by an addon
# Known issues: 
#   Issue: adding the phrase "filter add"(/chatter filter add filter add) will break the filter
#   solution: '/filter reset' or '/chatter filter remove filter remove'
#
#
# Policy: Feel free to skid, though i didnt make it too easy to read. Just dont claim full ownership without editing please!
#
# Changelog:
# [-] Fixed Various bugs
# [+] Player Banning
# [+] Player IP-Banning
# [+] Player Muting
# [+] Player Freezing
# [+] Alt tracking
#
#   CONFIG
#    | 
#    V
options:

  

  punishmentappeallink: / Your link here \ # the link banned players will be directed to when banned.
# How to get permanent discord invites > https://media.giphy.com/media/5b57bRMvCchZaQtp7c/giphy.gif

  defaultbanmsg: &cFailure to comply with the rules of the server #ban reason if reason is unspecified(also used for ipban)

  defaultbantime: &cPERMANENT #Ban time if left unspecified (also used for ipban)

  defaultmutemsg: &cHarmful/inapropriate language #mute message if left unspecified

  defaultmutetime: &cPERMANENT #Mute time if left unspecified

  filtermsg: &cYou can not say that!

  speakingtoofast: &cYou are chatting too fast!

  chatismuted: &cYou can not speak while the chat is muted!

  nochatdelay: permission.rank # no chat delay

  chatspeed1: permission.rank # 5 second chat delay

  chatspeed2: permission.rank # 10 second chat delay

  chatlogclear: 3 days 

# I recommend not giving the same rank/group 2 or more of these permissions(but i havent tried it)

# ================================================================
#              The stuff that make it work
# ================================================================

command /chatter [<text>]:
  trigger:
    if player has permission "chatter.admin":
      if arg 1 is not set:
        send "&9Chatter &bChat management by AVeryBadName" to player
        send formatted "&9/chatter&b filter add <word>%nl%&9/chatter &bfilter remove <word>%nl%&9/chatter&b filter reset%nl%&b<url:https://discord.gg/wPcnhK7mjZ><tooltip:&boptional>Join the discord! &9&lCLICK" to player
      else if arg 1 contains "filter add ":
        set {_arg1::*} to arg 1
        set {_arg1::*} to split arg 1 at "filter add "
        add {_arg1::2} to {filter::*}
        send "&9Chatter &bAdded ""%{_arg1::2}%"" to the &9/filter" to player
      else if arg 1 contains "filter reset":
        send "&9Chatter &bAre you sure? This can not be undone. &9/filterreset&b to "
        send "&9Chatter &f&l%player% &btyped &9/chatter filter reset &band was prompted to type &9/filter reset" to all players where [input has permission "chatter.admin"]
      else if arg 1 contains "filter remove ":
        set {_arg1::*} to arg 1
        set {_arg1::*} to split arg 1 at "filter remove "
        remove {_arg1::2} from {filter::*}
        send "&9Chatter &bRemoved ""%{_arg1::2}%"" from the &9/filter" to player
      else:
        send "&9Chatter &bChat management by AVeryBadName" to player
        send "&9/chatter&b filter add <word>%nl%&9/chatter &bfilter remove <word>" to player
    if player does not have permission "chatter.admin":
      send formatted "&9Chatter &bChat management by AVeryBadName%nl%<url:https://forums.skunity.com/resources/chatter.1410/><tooltip:&eClick>&9&nGet from SkUnity"
command /filter [<text>]:
  usage: &9/filter
  permission: chatter.admin
  trigger:
    arg 1 is not set:
      send "&9Chat filter words:"
      send "&b%{filter::*}%" 
    arg 1 is "reset":
      send "&9Chatter &f%player% &bHas reset the chat filter. Can not be undone."
command /clearmute:
  permission: chatter.admin
  trigger:
    loop 600 times:
      set {_rand} to random integer between 1 and 1000
      set {_rand2} to random integer between 1 and 1000
      send "%{_rand2}% %{_rand}%" to all players where [input does not have permission "chatter.admin"]
    send "&9Chatter &b- &f%player%&b Has cleared, and muted the chat." to all players
    send "&9Chatter &bThe chat was not cleared or muted for you but was for others. /mutechat to toggle mute" to all players where [input has permission "chatter.admin"]
    set {chatmuted} to true
command /mutechat:
  permission: chatter.admin
  trigger: 
    if {chatmuted} is not true:
      send "&9Chatter &f%player% muted the chat, but you can still speak" to all players where [input has permission "chatter.admin"]
      send "&9Chatter &f%player% has muted the chat" to all players
      set {chatmuted} to true
    else if {chatmuted} is true:
      send "&9Chatter &f%player% has unmuted the chat" to all players
      set {chatmuted} to false
command /clearchat:
  permission: chatter.admin
  trigger: 
    loop 600 times:
      set {_rand} to random integer between 1 and 1000
      set {_rand2} to random integer between 1 and 1000
      send "%{_rand2}% %{_rand}%" to all players where [input does not have permission "chatter.admin"]
    send "&9Chatter &b- &f%player%&b Has cleared the chat." to all players
    send "&9Chatter &bThe chat was not cleared for you but was for others" to all players where [input has permission "chatter.admin"]
on chat:
  {mutetime::%player's uuid%} is set:
    if difference between {mutestart::%player's uuid%} and now > {mutetime::%player's uuid%}:
      clear {mutetime::%player's uuid%}
      clear {muteend::%player's uuid%}
      clear {mutereason::%player's uuid%}
      clear {mutestart::%player's uuid%}
    if difference between {mutestart::%player's uuid%} and now <= {mutetime::%player's uuid%}:
      send formatted "%player% &8> &c%message% <tooltip:&9Chatter%nl%&bThis player is muted%nl%&bonly staff can see this>&7ⓘ" to all players where [input has permission "chatter.mute" or "chatter.admin"]
      cancel event
      if difference between {mutestart::%player's uuid%} and {muteend::%player's uuid%} > 100 years:
        send "&cYou were muted for &f%{mutereason::%player's uuid%}%%nl% &cExpires in: Never%nl%&bAppeal: <url:{@punishmentappeallink}>&bCLICK"
      else:
        send "&cYou were muted for &f%{mutereason::%player's uuid%}%%nl% &cExpires in: &f%(difference between now and {muteend::%player's uuid%})%%nl%&bAppeal: <url:{@punishmentappeallink}>&bCLICK"
      stop
  if {chatmuted} is true:
    player does not have permission "chatter.admin":
      cancel event
      send "{@chatismuted}"
      stop
  else if player has permission "{@chatspeed1}":
    difference between now and {lastchat::%player%} < 5 seconds:
      cancel event
      send "{@speakingtoofast}"
      stop
  else if player has permission "{@chatspeed2}":
    difference between now and {lastchat::%player%} < 10 seconds:
      cancel event
      send "{@speakingtoofast}"
      stop
  {filter::*} is empty:
    add "justasmallfix98324y924h287rh30r29887nf832hrff28ifubu8wdeedfewiujbfwifbe" to {filter::*}
  loop {filter::*}:
    if message contains loop-value:
      send "&9Chatter &f&l%player% &btried to say &c""%message%""&b, but was blocked. &9/filter" to all players where [input has permission "chatter.admin"]
      cancel event
      clear {lastchat::%player%}
      send "{@filtermsg}" to player
      if size of {chatlog::%player's uuid%::%{lognum::%player's uuid%}%::*} >= 50:
        add 1 to {lognum::%player's uuid%}
      add "&c%message%" to {chatlog::%player's uuid%::%{lognum::%player's uuid%}%::*}
      stop
  set {lastchat::%player%} to now
  if size of {chatlog::%player's uuid%::%{lognum::%player's uuid%}%::*} < 50:
    add "%message%" to {chatlog::%player's uuid%::%{lognum::%player's uuid%}%::*}
  if size of {chatlog::%player's uuid%::%{lognum::%player's uuid%}%::*} >= 50:
    add 1 to {lognum::%player's uuid%}
    add "%message%" to {chatlog::%player's uuid%::%{lognum::%player's uuid%}%::*}
on load:
  wait 5 minutes
  if {chatlogcleared} is not set:
    set {chatlogcleared} to now
  set {_time} to "{@chatlogclear}"
  if difference between now and {chatlogcleared} > ({_time} parsed as timespan):
    set {chattercanceling} to false
    send "&9Chatter &bChat log from past {@chatlogclear} deleting in 15 seconds(permanant)" to all players where [input has permission "chatter.chatlog"]
    send formatted "<command:/chattercancelclear><tooltip:&eCancel deletion of logs>&9Chatter &b&lCLICK HERE TO CANCEL" to all players where [input has permission "chatter.chatlog"]
    wait 15 seconds
    if {chattercanceling} is true:
      send formatted "&9Chatter&b Chat logs not cleared from recent load%nl%<command:/chatlogclear><tooltip:&edelete>&9Chatter &b&lClick here to delete anyway" to all players where [input has permission "chatter.chatlog"]
    if {chattercanceling} is false:
      clear {chatlog::*}
      send "&9Chatter&b Chat logs deleted. This cannot be undone" to all players where [input has permission "chatter.chatlog"]
      clear {chatlogcleared} 
on command:
  command contains "chattercancelclear":
    if player has permission "op":
      cancel event
      set {chattercanceling} to true
      send "&9Chatter &f&l%player% &bCanceled the deletion of the chat logs" to all players where [input has permission "chatter.chatlog"]
  else if command contains "chatlogclear":
    player has permission "op":
      cancel event
      send "&9Chatter &f&l%player% &bCleared the chat logs" to all players where [input has permission "chatter.chatlog"]
      set {chatlogcleared} to now
      clear {chatlog::*}
on first join:
  set {lognum::%player's uuid%} to 1
command /chatlog [<offline player>] [<player>] [<int>]:
  usage: &9Chatter &b/chatlog (player) [page]
  permission: chatter.chatlog
  trigger:
    if arg 1 is set:
      if arg 2 is set:
        send "&9Chatter &b/chatlog (player) [page]"
        stop
      if arg 2 is not set:
        set {_p} to arg 1
    if arg 2 is set:
      arg 1 is not set
      set {_p} to arg 2
    if arg 3 is set:
      set {_num} to arg 3
    if arg 3 is not set:
      set {_num} to {lognum::%player's uuid%}
    send "&9Chatter&b Chatter last cleared %difference between now and {chatlogcleared}%&b ago, meaning messages were not logged before then"
    send "&9Chatter &bPage %{_num}%&b of Logs: &b%{_p}%"
    loop {chatlog::%{_p}'s uuid%::%{_num}%::*}:
      send """%loop-value%&f"""
command /report [<offline player>] [<player>] <text>:
  permission: chatter.report
  usage: &9/report &b(player) (reason)
  trigger:
    if arg 1 is set:
      if arg 2 is set:
        send "&9Chatter &bInput error - You cannot report more than 1 person at a time"
      else if arg 2 is not set:
        set {_tps::*} to "%tps%" split at ","
        send "&7&l] &9Chatter &f&l%player% &breported someone:%nl%&7&l[ &f&l%arg 1% &bis &9%arg 3%%nl%&7&l[ &9TPS: &b%{_tps::1}%%nl%&7&l[ &9Ping: &b%arg-1's ping%" to all players where [input has permission "chatter.report.review" or "chatter.admin"]
    if arg 1 is not set:
      if arg 2 is not set:
        send "&9Chatter &bInput error - You cannot report no one"
      if arg 2 is set:
        set {_tps::*} to "%tps%" split at ","
        send "&7&l] &9Chatter &f&l%player% &breported someone:%nl%&7&l[ &f&l%arg 2% &bis &9%arg 3%%nl%&7&l[ &9TPS: &b%{_tps::1}%%nl%&7&l[ &9Ping: &b%arg-2's ping%" to all players where [input has permission "chatter.report.review" or "chatter.admin"]
command /ban [<offline player>] [<player>] [<time span>] [<text>]:
  permission: chatter.ban
  trigger:
    if arg 1 is not set:
      if arg 2 is not set:
        send "&9/ban &b(player) (time(7 days, 4 hours, 30 minutes, etc.)) (reason)" 
    arg 1 is set:
      arg 2 is set:
        send "&9/ban &b(player) (time(7 days, 4 hours, 30 minutes, etc.)) (reason)"
        stop
    if arg 1 is set:
      set {_player} to arg 1
    if arg 2 is set:
      set {_player} to arg 2
    if arg 3 is set:
      set {_time} to arg 3
    if arg 3 is not set:
      set {_eeeeee} to "{@defaultbantime}"
      if "%uncolored {_eeeeee}%" = "permanent" or "forever":
        set {_1} to true
      else:
        set {_time} to "{@defaultbantime}"
    if arg 4 is set:
      set {_reason} to arg 4
    if arg 4 is not set:
      set {_reason} to "{@defaultbanmsg}"
    {_1} is true:
      send "&9Chatter&f %player% &bBanned &f%{_player}% for %{_reason}% &c&lFOREVER" to all players where [input has permission "chatter.ban" or "chatter.admin"]
      kick {_player} because "&fYou were banned by %player% for %{_reason}%%nl%&fBan duration: &cForever%nl%&fAppeal: {@punishmentappeallink}"
      ban {_player} because "&fYou were banned by %player% for %{_reason}%%nl%&fBan duration: &cForever%nl%&fAppeal: {@punishmentappeallink}"
    {_1} is not true:
      send "&9Chatter&f %player% &bBanned &f%{_player}% for %{_reason}%&b for %{_time}%" to all players where [input has permission "chatter.ban" or "chatter.admin"]
      set {_m} to now
      add {_time} to {_m}
      kick {_player} because "&fYou were banned by %player% for %{_reason}%%nl%&fBan duration: %{_time}%&7(%{_m}%)%nl%&fAppeal: {@punishmentappeallink}"
      ban {_player} because "&fYou were banned by %player% for %{_reason}%%nl%&fBan duration: %{_time}%&7(%{_m}%)%nl%&fAppeal: {@punishmentappeallink}" for {_time}
command /unban <offlineplayer>:
  usage: &9/unban &b(player)
  permission: chatter.ban
  trigger:
    send "&9Chatter &f%player% &bunbanned &f%arg-1%" to all players where [input has permission "chatter.ban" or "chatter.admin"]
    unban arg-1
command /mute [<offline player>] [<player>] [<time span>] [<text>]:
  permission: chatter.mute
  trigger:
    if arg 1 is not set:
      if arg 2 is not set:
        send "&9/mute &b(player) (time(7 days, 4 hours, 30 minutes, etc.)) (reason)"
        stop
    arg 1 is set:
      arg 2 is set:
        send "&9/mute &b(player) (time(7 days, 4 hours, 30 minutes, etc.)) (reason)"
        stop
    if arg 1 is set:
      set {_player} to arg 1
    if arg 2 is set:
      set {_player} to arg 2
    if arg 3 is set:
      set {_time} to arg 3
    if arg 3 is not set:
      set {_eeeeee} to "{@defaultmutetime}"
      if "%uncolored {_eeeeee}%" = "permanent" or "forever":
        set {_1} to true
      else:
        set {_time} to "{@defaultmutetime}"
    if arg 4 is set:
      set {_reason} to arg 4
    if arg 4 is not set:
      set {_reason} to "{@defaultmutemsg}"
    {_1} is true:
      set {mutestart::%{_player}'s uuid%} to now
      set {mutereason::%{_player}'s uuid%} to {_reason}
      set {mutetime::%{_player}'s uuid%} to 900 years
      set {muteend::%{_player}'s uuid%} to now
      add 900 years to {muteend::%{_player}'s uuid%}
      send "&9Chatter&f %player% &bMuted &f%{_player}% for %{_reason}% &c&lFOREVER" to all players where [input has permission "chatter.mute" or "chatter.admin"]
      send formatted "&fYou were muted by %player% for %{_reason}%%nl%&fMuted ends in: &cNever%nl%&fAppeal: <tooltip:&eClick><url:{@punishmentappeallink}>&bCLICK" to {_player}
    {_1} is not true:
      send "&9Chatter&f %player% &bMuted &f%{_player}% for %{_reason}%&b for %{_time}%" to all players where [input has permission "chatter.mute" or "chatter.admin"]
      set {mutestart::%{_player}'s uuid%} to now
      set {mutereason::%{_player}'s uuid%} to {_reason}
      set {mutetime::%{_player}'s uuid%} to {_time}
      set {muteend::%{_player}'s uuid%} to now
      add {_time} to {muteend::%{_player}'s uuid%}
      send formatted "&fYou were muted by %player% for %{_reason}%%nl%&fMute ends in: %difference between now and {muteend::%{_player}'s uuid%}%%nl%&fAppeal: <tooltip:&eClick><url:{@punishmentappeallink}>&bCLICK" to {_player}
command /ipban [<offline player>] [<player>] [<time span>] [<text>]:
  permission: chatter.ban
  trigger:
    if arg 1 is not set:
      if arg 2 is not set:
        send "&9/ipban &b(player) (time(7 days, 4 hours, 30 minutes, etc.)) (reason)" 
    arg 1 is set:
      arg 2 is set:
        send "&9/ipban &b(player) (time(7 days, 4 hours, 30 minutes, etc.)) (reason)"
        stop
    if arg 1 is set:
      set {_player} to arg 1
    if arg 2 is set:
      set {_player} to arg 2
    if arg 3 is set:
      set {_time} to arg 3
    if arg 3 is not set:
      set {_eeeeee} to "{@defaultbantime}"
      if "%uncolored {_eeeeee}%" = "permanent" or "forever":
        set {_1} to true
      else:
        set {_time} to "{@defaultbantime}"
    if arg 4 is set:
      set {_reason} to arg 4
    if arg 4 is not set:
      set {_reason} to "{@defaultbanmsg}"
    {_1} is true:
      send "&9Chatter&f %player% &bIP-Banned &f%{_player}% for %{_reason}% &c&lFOREVER" to all players where [input has permission "chatter.ban" or "chatter.admin"]
      kick {_player} because "&fYou were banned by %player% for %{_reason}%%nl%&fBan duration: &cForever%nl%&fAppeal: {@punishmentappeallink}"
      ip ban {_player} because "&fYou were banned by %player% for %{_reason}%%nl%&fBan duration: &cForever%nl%&fAppeal: {@punishmentappeallink}"
    {_1} is not true:
      send "&9Chatter&f %player% &bIP-Banned &f%{_player}% for %{_reason}%&b for %{_time}%" to all players where [input has permission "chatter.ban" or "chatter.admin"]
      set {_m} to now
      add {_time} to {_m}
      kick {_player} because "&fYou were banned by %player% for %{_reason}%%nl%&fBan duration: %{_time}%&7(%{_m}%)%nl%&fAppeal: {@punishmentappeallink}"
      ip ban {_player} because "&fYou were banned by %player% for %{_reason}%%nl%&fBan duration: %{_time}%&7(%{_m}%)%nl%&fAppeal: {@punishmentappeallink}" for {_time}
on join:
  add player's ip to {knownips::%player's uuid%::*} if {knownips::%player's uuid%::*} does not contain player's ip
  add player to {alts::%player's ip%::*} if {alts::%player's ip%::*} does not contain player
  loop {knownips::%player's uuid%::*}:
    add {alts::%player's ip%::*} to {_list::*}
  loop {_list::*}:
    loop-value is banned:
      send "&9Chatter &f%player% &chas a banned alt&7(%loop-value%)" to all players where [input has permission "chatter.admin" or "chatter.alts"]
command /alts <offline player>:
  usage: &9/alts &b(player)
  permission: chatter.alts
  trigger:
    send "&9Chatter &bAll known alts of &f%arg-1%&b:%nl%&7(each &b|&7 is a new ip)"
    loop {knownips::%arg-1's uuid%::*}:
      send "&b|&f %{alts::%loop-value%::*}%"
command /freeze <player>:
  usage: &9/freeze &b(player)
  permission: chatter.freeze
  trigger:
    if {frozen::%arg-1%} is true:
      set {frozen::%arg-1%} to false
      send "&9Chatter &f%arg-1%&b is no longer frozen"  
    else if {frozen::%arg-1%} is not true:
      set {frozen::%arg-1%} to true
      send "&9Chatter &f%arg-1%&b is now frozen"
on player move: 
  {frozen::%player%} is true
  cancel event
  send title "&cYou are frozen"
  send subtitle "&cPlease cooperate with staff"
on disconnect:
  {frozen::%player%} is true
  set {frozen::%player%} to false
  send "&9Chatter &f%player% &bdisconnected while frozen. They were unfrozen in case they were banned." to all players where [input has permission "chatter.freeze" or "chatter.ban"]
command /unmute <offline player>:
  usage: &9/unmute &b(player)
  permission: chatter.mute
  trigger:
    clear {mutereason::%arg-1's uuid%}
    clear {mutetime::%arg-1's uuid%}
    clear {muteend::%arg-1's uuid%} 
    clear {mutestart::%arg-1's uuid%}
    send "&9Chatter &f%player% &bunmuted &f%arg-1%" to all players where [input has permission "chatter.admin", "chatter.freeze", "chatter.mute" or "chatter.ban"]