summaryrefslogtreecommitdiff
path: root/src/plugins/sample.c
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-05 13:23:07 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-05 13:23:07 +0000
commit288490094a7fe9167747dc78d416940759a31197 (patch)
tree53dc4f5c2375f4b688b53ca8841630ddec5e1f88 /src/plugins/sample.c
parent8ec1c47aed09c90343949d57c92760ba84738a46 (diff)
downloadhercules-288490094a7fe9167747dc78d416940759a31197.tar.gz
hercules-288490094a7fe9167747dc78d416940759a31197.tar.bz2
hercules-288490094a7fe9167747dc78d416940759a31197.tar.xz
hercules-288490094a7fe9167747dc78d416940759a31197.zip
- Massive EOL normalization & 'svn:eol-style native' flag setting for all txt/conf/h/c files.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9410 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/plugins/sample.c')
-rw-r--r--src/plugins/sample.c154
1 files changed, 77 insertions, 77 deletions
diff --git a/src/plugins/sample.c b/src/plugins/sample.c
index 5a8e2a286..39e95752b 100644
--- a/src/plugins/sample.c
+++ b/src/plugins/sample.c
@@ -1,77 +1,77 @@
-// Sample Athena plugin
-
-#include <stdio.h>
-#include <string.h>
-#include "../common/plugin.h"
-
-////// Plugin information ////////
-//
-PLUGIN_INFO = {
-// change only the following area
- "Test", // Plugin name
- PLUGIN_ALL, // Which servers is this plugin for
- "0.1", // Plugin version
- PLUGIN_VERSION, // Minimum plugin engine version to run
- "A sample plugin" // Short description of plugin
-};
-
-////// Plugin event list //////////
-// Format: <plugin function>,<event name>
-// All registered functions to a event gets executed
-// (In descending order) when its called.
-// Multiple functions can be called by multiple events too,
-// So it's up to your creativity ^^
-//
-PLUGIN_EVENTS_TABLE = {
-// change only the following area
- { "test_me", "Plugin_Test" }, // when the plugin is tested for compatibility
- { "do_init", "Plugin_Init" }, // when plugins are loaded
- { "do_final", "Plugin_Final" }, // when plugins are unloaded
- { "some_function", "some_event" },
- { "some_function", "another_event" },
- { NULL, NULL }
-};
-
-///// Variables /////
-char *server_type;
-char *server_name;
-
-//////// Plugin functions //////////
-int do_init ()
-{
- // import symbols from the server
- IMPORT_SYMBOL(server_type, 0);
- IMPORT_SYMBOL(server_name, 1);
-
- printf ("Server type is ");
- switch (*server_type) {
- case PLUGIN_LOGIN: printf ("Login\n"); break;
- case PLUGIN_CHAR: printf ("Char\n"); break;
- case PLUGIN_MAP: printf ("Map\n"); break;
- }
- printf ("Filename is %s\n", server_name);
-
- return 1;
-}
-
-int do_final ()
-{
- printf ("Bye world\n");
-
- return 1;
-}
-
-int some_function ()
-{
- printf ("Some function\n");
- return 0;
-}
-
-// return 1 if the testing passes, otherwise 0
-// (where the plugin will be deactivated)
-int test_me ()
-{
- if (1 + 1 == 2)
- return 1;
- return 0;
-}
+// Sample Athena plugin
+
+#include <stdio.h>
+#include <string.h>
+#include "../common/plugin.h"
+
+////// Plugin information ////////
+//
+PLUGIN_INFO = {
+// change only the following area
+ "Test", // Plugin name
+ PLUGIN_ALL, // Which servers is this plugin for
+ "0.1", // Plugin version
+ PLUGIN_VERSION, // Minimum plugin engine version to run
+ "A sample plugin" // Short description of plugin
+};
+
+////// Plugin event list //////////
+// Format: <plugin function>,<event name>
+// All registered functions to a event gets executed
+// (In descending order) when its called.
+// Multiple functions can be called by multiple events too,
+// So it's up to your creativity ^^
+//
+PLUGIN_EVENTS_TABLE = {
+// change only the following area
+ { "test_me", "Plugin_Test" }, // when the plugin is tested for compatibility
+ { "do_init", "Plugin_Init" }, // when plugins are loaded
+ { "do_final", "Plugin_Final" }, // when plugins are unloaded
+ { "some_function", "some_event" },
+ { "some_function", "another_event" },
+ { NULL, NULL }
+};
+
+///// Variables /////
+char *server_type;
+char *server_name;
+
+//////// Plugin functions //////////
+int do_init ()
+{
+ // import symbols from the server
+ IMPORT_SYMBOL(server_type, 0);
+ IMPORT_SYMBOL(server_name, 1);
+
+ printf ("Server type is ");
+ switch (*server_type) {
+ case PLUGIN_LOGIN: printf ("Login\n"); break;
+ case PLUGIN_CHAR: printf ("Char\n"); break;
+ case PLUGIN_MAP: printf ("Map\n"); break;
+ }
+ printf ("Filename is %s\n", server_name);
+
+ return 1;
+}
+
+int do_final ()
+{
+ printf ("Bye world\n");
+
+ return 1;
+}
+
+int some_function ()
+{
+ printf ("Some function\n");
+ return 0;
+}
+
+// return 1 if the testing passes, otherwise 0
+// (where the plugin will be deactivated)
+int test_me ()
+{
+ if (1 + 1 == 2)
+ return 1;
+ return 0;
+}