--- plugins/cfpython/cfpython.c 2006-01-30 21:44:56.000000000 -0800
+++ plugins/cfpython/cfpython.c.new 2006-05-16 15:59:29.000000000 -0700
@@ -673,7 +673,7 @@
scriptfile = fopen(context->script, "r");
if (scriptfile == NULL) {
if (!silent)
- printf( "cfpython - The Script file %s can't be opened\n", context->script);
+ LOG(llevError, "cfpython - The Script file %s can't be opened\n", context->script);
return 0;
}
pushContext(context);
@@ -705,7 +705,7 @@
PyObject *m, *d;
int i;
gethook = gethooksptr;
- printf("CFPython 2.0a init\n");
+ LOG(llevDebug, "CFPython 2.0a init\n");
Py_Initialize();
Crossfire_ObjectType.tp_new = PyType_GenericNew;
@@ -795,7 +795,7 @@
rv = 0;
if (current_command < 0) {
- printf("Illegal call of runPluginCommand, call find_plugin_command first.\n");
+ LOG(llevError, "Illegal call of runPluginCommand, call find_plugin_command first.\n");
return 1;
}
snprintf(buf, sizeof(buf), "%s.py", cf_get_maps_directory(CustomCommand[current_command].script));
@@ -831,7 +831,7 @@
int rtype = 0;
FILE* scriptfile;
- printf("CFPython 2.0a post init\n");
+ LOG(llevDebug, "CFPython 2.0a post init\n");
registerGlobalEvent = gethook(&rtype, hooktype, "cfapi_system_register_global_event");
unregisterGlobalEvent = gethook(&rtype, hooktype, "cfapi_system_unregister_global_event");
systemDirectory = gethook(&rtype, hooktype, "cfapi_system_directory");
@@ -890,7 +890,7 @@
strcpy(context->options, "");
switch(context->event_code) {
case EVENT_CRASH:
- printf( "Unimplemented for now\n");
+ LOG(llevDebug, "Unimplemented for now\n");
break;
case EVENT_BORN:
op = va_arg(args, object*);
@@ -1044,7 +1044,7 @@
CF_PLUGIN int closePlugin()
{
- printf("CFPython 2.0a closing\n");
+ LOG(llevDebug, "CFPython 2.0a closing\n");
Py_Finalize();
return 0;
}
--- plugins/cfpython/cfpython_map.c 2006-02-14 23:24:11.000000000 -0800
+++ plugins/cfpython/cfpython_map.c.new 2006-05-16 15:59:40.000000000 -0700
@@ -176,7 +176,7 @@
/* make sure the map is swapped in */
if (map->map->in_memory != MAP_IN_MEMORY)
{
- printf("MAP AIN'T READY !\n");
+ LOG(llevError, "MAP AIN'T READY !\n");
}
mflags = cf_map_get_flags(map->map, &(map->map), (sint16)x, (sint16)y, &nx, &ny);