summaryrefslogtreecommitdiff
path: root/plugins/shop.py
diff options
context:
space:
mode:
authorHoraK-FDF <horak-fdf@web.de>2022-03-04 13:34:46 +0100
committerHoraK-FDF <horak-fdf@web.de>2022-03-04 13:34:46 +0100
commit8d97382f5eae70938dbeb490679114c8b85e5991 (patch)
treeb33d855366dd1c0a5fda926e5664a7e5e6d0ca10 /plugins/shop.py
parent728ba8aa6255fa2b8be2cfc759ba202a1a712504 (diff)
downloadmanachat-8d97382f5eae70938dbeb490679114c8b85e5991.tar.gz
manachat-8d97382f5eae70938dbeb490679114c8b85e5991.tar.bz2
manachat-8d97382f5eae70938dbeb490679114c8b85e5991.tar.xz
manachat-8d97382f5eae70938dbeb490679114c8b85e5991.zip
chat ignore and some fixes
Diffstat (limited to 'plugins/shop.py')
-rwxr-xr-xplugins/shop.py18
1 files changed, 1 insertions, 17 deletions
diff --git a/plugins/shop.py b/plugins/shop.py
index 7e0f5f1..5e3bf24 100755
--- a/plugins/shop.py
+++ b/plugins/shop.py
@@ -10,12 +10,11 @@ import badge
import random
from net.inventory import get_item_index
from net.trade import reset_trade_state
-from utils import encode_str, extends
+from utils import encode_str, extends, preloadArray
from itemdb import item_name
from playerlist import PlayerList
from chat import send_whisper as whisper
-
__all__ = [ 'PLUGIN', 'init', 'shoplog', 'buying', 'selling' ]
nobuy = []
@@ -34,21 +33,6 @@ shoplog = logging.getLogger('ManaChat.Shop')
trade_timeout = 60
shop_admins = None
-# Commented due to player abusing trade commands too many times per minute
-# FIXME Put on a specified library
-def preloadArray(nfile):
- try:
- array=[]
- file = open(nfile, "r")
- for x in file.readlines():
- x = x.replace("\n", "")
- x = x.replace("\r", "")
- array.append(x)
- file.close()
- return array
- except:
- print "preloadArray: File " + nfile + " not found!"
-
ignored_players = preloadArray("config/ignored.txt")
# ~ sell_greetings = [