summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Beller <stefanbeller@googlemail.com>2011-10-23 20:03:22 +0200
committerStefan Beller <stefanbeller@googlemail.com>2011-10-23 20:04:45 +0200
commit060f0523436e8cb206f463b78ba5e7e60a28babc (patch)
treeb3bd59df489bc05d5a0ebd0a334adb92a3c1358b
parent17033910747e0e2a5d42583934fb292dd55ff599 (diff)
downloadmanamarket-060f0523436e8cb206f463b78ba5e7e60a28babc.tar.gz
manamarket-060f0523436e8cb206f463b78ba5e7e60a28babc.tar.bz2
manamarket-060f0523436e8cb206f463b78ba5e7e60a28babc.tar.xz
manamarket-060f0523436e8cb206f463b78ba5e7e60a28babc.zip
Adding serious file headers.
-rw-r--r--being.py24
-rwxr-xr-xmain.py27
-rw-r--r--net/packet.py2
-rw-r--r--net/packet_out.py1
-rw-r--r--net/protocol.py1
-rw-r--r--player.py24
-rw-r--r--tradey.py24
-rw-r--r--utils.py24
8 files changed, 104 insertions, 23 deletions
diff --git a/being.py b/being.py
index 3c70616..3c920f6 100644
--- a/being.py
+++ b/being.py
@@ -1,10 +1,26 @@
#!/usr/bin/python
"""
- Copyright 2011, Dipesh Amin <yaypunkrock@gmail.com>
- Copyright 2011, Stefan Beller <stefanbeller@googlemail.com>
+Copyright 2011, Dipesh Amin <yaypunkrock@gmail.com>
+Copyright 2011, Stefan Beller <stefanbeller@googlemail.com>
- This file is part of tradey, a trading bot in the mana world
- see www.themanaworld.org
+This file is part of tradey, a trading bot in The Mana World
+see www.themanaworld.org
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+
+Additionally to the GPL, you are *strongly* encouraged to share any modifications
+you do on these sources.
"""
def job_type(job):
diff --git a/main.py b/main.py
index 4b50b60..6145572 100755
--- a/main.py
+++ b/main.py
@@ -1,11 +1,26 @@
#!/usr/bin/python
"""
+Copyright 2011, Dipesh Amin <yaypunkrock@gmail.com>
+Copyright 2011, Stefan Beller <stefanbeller@googlemail.com>
- Copyright 2011, Dipesh Amin <yaypunkrock@gmail.com>
- Copyright 2011, Stefan Beller <stefanbeller@googlemail.com>
+This file is part of tradey, a trading bot in The Mana World
+see www.themanaworld.org
- tradey, a package, which implements an Automated Market Bot for "The Mana World" a 2D MMORPG.
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2 of the License, or (at your option)
+any later version.
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+
+Additionally to the GPL, you are *strongly* encouraged to share any modifications
+you do on these sources.
"""
import logging
@@ -267,7 +282,7 @@ def process_whisper(nick, msg, mapserv):
weight = ItemDB.item_names[int(item_info.get('itemId'))].weight*int(item_info.get("amount"))
mapserv.sendall(whisper(nick, "That item/s belongs to: "+item_info.get("name")))
- mapserv.sendall(whisper(nick, "The weight used is: "+str(weight)+"/"+str(player_node.MaxWEIGHT)))
+ mapserv.sendall(whisper(nick, "The weight used is: "+str(weight)+"/"+str(player_node.MaxWEIGHT)))
elif msg == '!listusers':
# Admin command - shows a list of all user.
@@ -283,13 +298,13 @@ def process_whisper(nick, msg, mapserv):
total_slots_reserved = 0
total_slots_used = 0
no_users = 0
-
+
for user in user_tree.root:
no_users += 1
name = user.get('name')
accesslevel = user.get('accesslevel')
slots = user.get('stalls')
- total_slots_reserved += int(slots)
+ total_slots_reserved += int(slots)
used_slots = user.get('used_stalls')
total_slots_used += int(used_slots)
money = user.get('money')
diff --git a/net/packet.py b/net/packet.py
index 16b4f79..52bdf71 100644
--- a/net/packet.py
+++ b/net/packet.py
@@ -1,5 +1,5 @@
-"""The PacketBuffer class has been adapted from source originally released by gnufrk"""
+# The PacketBuffer class has been adapted from source originally released by gnufrk
import struct
diff --git a/net/packet_out.py b/net/packet_out.py
index 1d6e2d2..366be5f 100644
--- a/net/packet_out.py
+++ b/net/packet_out.py
@@ -1,3 +1,4 @@
+# This file has been adapted from source originally released by gnufrk
from packet import *
from protocol import *
diff --git a/net/protocol.py b/net/protocol.py
index 4a4b74f..d110a7e 100644
--- a/net/protocol.py
+++ b/net/protocol.py
@@ -1,3 +1,4 @@
+# This file has been adapted from source originally released by gnufrk
SMSG_LOGIN_DATA = 0x0069
SMSG_CHAR_LOGIN = 0x006b
SMSG_CHAR_MAP_INFO = 0x0071
diff --git a/player.py b/player.py
index 24bb5a9..6417368 100644
--- a/player.py
+++ b/player.py
@@ -1,10 +1,26 @@
#!/usr/bin/python
"""
- Copyright 2011, Dipesh Amin <yaypunkrock@gmail.com>
- Copyright 2011, Stefan Beller <stefanbeller@googlemail.com>
+Copyright 2011, Dipesh Amin <yaypunkrock@gmail.com>
+Copyright 2011, Stefan Beller <stefanbeller@googlemail.com>
- This file is part of tradey, a trading bot in the mana world
- see www.themanaworld.org
+This file is part of tradey, a trading bot in The Mana World
+see www.themanaworld.org
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+
+Additionally to the GPL, you are *strongly* encouraged to share any modifications
+you do on these sources.
"""
import copy
diff --git a/tradey.py b/tradey.py
index 01f855e..673fc46 100644
--- a/tradey.py
+++ b/tradey.py
@@ -1,10 +1,26 @@
#!/usr/bin/python
"""
- Copyright 2011, Dipesh Amin <yaypunkrock@gmail.com>
- Copyright 2011, Stefan Beller <stefanbeller@googlemail.com>
+Copyright 2011, Dipesh Amin <yaypunkrock@gmail.com>
+Copyright 2011, Stefan Beller <stefanbeller@googlemail.com>
- This file is part of tradey, a trading bot in the mana world
- see www.themanaworld.org
+This file is part of tradey, a trading bot in The Mana World
+see www.themanaworld.org
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+
+Additionally to the GPL, you are *strongly* encouraged to share any modifications
+you do on these sources.
"""
import time
import os
diff --git a/utils.py b/utils.py
index fc4f8dd..c517558 100644
--- a/utils.py
+++ b/utils.py
@@ -1,10 +1,26 @@
#!/usr/bin/python
"""
- Copyright 2011, Dipesh Amin <yaypunkrock@gmail.com>
- Copyright 2011, Stefan Beller <stefanbeller@googlemail.com>
+Copyright 2011, Dipesh Amin <yaypunkrock@gmail.com>
+Copyright 2011, Stefan Beller <stefanbeller@googlemail.com>
- This file is part of tradey, a trading bot in the mana world
- see www.themanaworld.org
+This file is part of tradey, a trading bot in The Mana World
+see www.themanaworld.org
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+
+Additionally to the GPL, you are *strongly* encouraged to share any modifications
+you do on these sources.
"""
from xml.etree.ElementTree import ElementTree
from player import Item