diff options
Diffstat (limited to 'plugins/shop.py')
-rwxr-xr-x | plugins/shop.py | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/plugins/shop.py b/plugins/shop.py index cf8a113..adeb66f 100755 --- a/plugins/shop.py +++ b/plugins/shop.py @@ -18,8 +18,7 @@ from chat import send_whisper as whisper __all__ = [ 'PLUGIN', 'init', 'shoplog', 'buying', 'selling' ] -#nobuy = ['Manatauro', 'ManatauroMage', 'Manatauro Shop', 'kytty'] -nobuy = ['kirito123'] +nobuy = [] PLUGIN = { 'name': 'shop', @@ -36,6 +35,31 @@ shoplog = logging.getLogger('ManaChat.Shop') trade_timeout = 60 shop_admins = None +# FIXME Put on a specified library +def preloadArray(nfile): + try: + file = open(nfile, "r") + array=[] + 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!" + +sell_greetings = [ + "Hi {0}! Welcome to my shop!", +] + +buy_greetings = [ + "Okay! Let's see what you've got to sell!", +] + +sell_greetings = preloadArray("config/sellGreetings.txt") +buy_greetings = preloadArray("config/buyGreetings.txt") + class s: player = '' @@ -68,21 +92,6 @@ def cleanup(): s.index = 0 s.start_time = 0 -sell_greetings = [ - "Hi {0}! Welcome to my shop!", - "Hey {0}, wanna something?", - "Let\'s do business!", - "Yeah! Spend your money here!", - "Shop here {0}, yes!", -] - -buy_greetings = [ - "Okay! Let's see what you've got to sell!", - "Hmm? Something interesting to trade?", - "Hey {0}, I'm not going to buy garbage!", - "Uh? Sorry I was\'t listening.", -] - # ========================================================================= def selllist(nick, message, is_whisper, match): if not is_whisper: |