Download
(1 Kb)
Download
Updated: 07/05/20 07:32 PM
Compatibility:
Greymoor (6.0.5)
Updated:07/05/20 07:32 PM
Created:07/05/20 06:48 PM
Monthly downloads:16
Total downloads:2,206
Favorites:0
MD5:
NoMoreCarries
Version: 1.1
by: Drako-Ei [More]
¿Tired of carry adds at craglon?
Me too... thats why I wrote this addon
How it works:
  • If the spam score is greater or equal to 3, the message gets blocked
  • Every linked archivement = 1 Spam score
  • Every linked collectible = 1 Spam score
  • Use /togglecarries to turn on/off the filter
  • Spam score algorithm will change if people find ways to bypass this addon
  • Message me (@Drako-Ei) if you found a way to bypass the filter, so i can fix it
  • I dont get mad if you donate me gold :S
1.1:
* Added collectible score
Archived Files (1)
File Name
Version
Size
Uploader
Date
1.0
1kB
07/05/20 06:48 PM


Post A Reply Comment Options
Unread 07/06/20, 10:53 PM  
Drako-Ei
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 7
Uploads: 4
Smile Thank you!

Originally Posted by Baertram
Thanks for the addon.
A small speed up fix if you like to:

Lua Code:
  1. function NoMoreCarries.OnChat(self, eventKey, ...)
  2.         if not NoMoreCarries.active or eventKey ~= EVENT_CHAT_MESSAGE_CHANNEL then return false end
  3.     local messageType, _, rawMessageText, _, fromDisplayName = select(1, ...)
  4.     local messageLower = string.lower(rawMessageText)
  5.     local _, achievementScore = string.gsub(messageLower, 'h1:achievement:', '')
  6.     local _, collectibleScore = string.gsub(messageLower, 'h1:collectible:', '')
  7.     local carryScore = achievementScore + collectibleScore
  8.     return carryScore >= NoMoreCarries.threshold
  9. end

Will check if your addon is "ready" (event player activated) and the chat channel directly at the beginning of the function.
You could also try to add an event filter on the eventKey (if there exists such an event filtertype) -> See the wiki "Event filter"
This will happen before lua code is run and speeds up everythign at events a lot (like filtering non wanted message channels even before lua code hits).

Edit:
I've checked the wiki https://wiki.esoui.com/AddFilterForEvent
Unfortunately there is no chat channel event filter

but: Your current code also filters your own messages, isn't it? Is this intended? Maybe check for fromDisplayName ~= GetDisplayName()
Thank you! Im still learning to code addons, so I appreciate a lot your feedback, excluding your own messages from the filter is something I didn't think about. Now I have something to do the next weekend!
Report comment to moderator  
Reply With Quote
Unread 07/06/20, 02:51 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
Thanks for the addon.
A small speed up fix if you like to:

Lua Code:
  1. function NoMoreCarries.OnChat(self, eventKey, ...)
  2.         if not NoMoreCarries.active or eventKey ~= EVENT_CHAT_MESSAGE_CHANNEL then return false end
  3.     local messageType, _, rawMessageText, _, fromDisplayName = select(1, ...)
  4.     local messageLower = string.lower(rawMessageText)
  5.     local _, achievementScore = string.gsub(messageLower, 'h1:achievement:', '')
  6.     local _, collectibleScore = string.gsub(messageLower, 'h1:collectible:', '')
  7.     local carryScore = achievementScore + collectibleScore
  8.     return carryScore >= NoMoreCarries.threshold
  9. end

Will check if your addon is "ready" (event player activated) and the chat channel directly at the beginning of the function.
You could also try to add an event filter on the eventKey (if there exists such an event filtertype) -> See the wiki "Event filter"
This will happen before lua code is run and speeds up everythign at events a lot (like filtering non wanted message channels even before lua code hits).

Edit:
I've checked the wiki https://wiki.esoui.com/AddFilterForEvent
Unfortunately there is no chat channel event filter

but: Your current code also filters your own messages, isn't it? Is this intended? Maybe check for fromDisplayName ~= GetDisplayName()
Last edited by Baertram : 07/06/20 at 02:55 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: