summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-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 = [