[Mudaid-devel] Command Stacking Diff - Merry Xmas
Status: Pre-Alpha
Brought to you by:
ffault
|
From: James D. <ro...@ph...> - 2000-10-04 21:34:40
|
Okay, so it took me more time to learn to use diff than it did to write
the command stacking code.. here's something useful for ya =)
************ BEGIN FILE CommandStacking-0.1a.diff ************
diff -u --recursive mudaid/viewer.c ComStack.dev/viewer.c
--- mudaid/viewer.c Tue Aug 1 11:56:17 2000
+++ ComStack.dev/viewer.c Wed Oct 4 14:27:24 2000
@@ -231,6 +231,8 @@
void sendmud_callback (GtkWidget *widget, gpointer data)
{
gchar *text;
+ gchar *StackChar = ";"; /* Command Stacking Separator */
+ gint foo = 0;
text = gtk_entry_get_text (GTK_ENTRY (data));
@@ -245,6 +247,19 @@
return;
}
+ /* Begin new command stacking stuff
+ * James Daniel - October 4, 2000
+ */
+
+ for(;text[foo]!=0;foo++)
+ if(text[foo] == StackChar[0]) text[foo] = '\n';
+
+ /*
+ * End new command stacking stuff.. easy, eh?
+ * Will be no problem to make the character
+ * configurable later...
+ */
+
if (mud.is_connected)
send_mud (text);
else
************ EOF ************
James Daniel ( ro...@ph... / jd...@os... )
Open Source Education Foundation - http://www.osef.org
|