fix failures to byteswap images (in imageManager and imagepreview)
[openc2e.git] / caosVM_net.cpp
blob07fb9d74388b3ee3a125b76f631b07115ebec901
1 /*
2 * caosVM_net.cpp
3 * openc2e
5 * Created by Alyssa Milburn on Mon Aug 29 2005.
6 * Copyright (c) 2005 Alyssa Milburn. All rights reserved.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
20 #include "caosVM.h"
22 /**
23 NET: PASS (command) nick_name (string) password (string)
24 %status stub
26 Networking is not supported in openc2e, so does nothing.
28 void caosVM::c_NET_PASS() {
29 VM_PARAM_STRING(password)
30 VM_PARAM_STRING(nick_name)
33 /**
34 NET: PASS (string)
35 %status stub
37 Networking is not supported in openc2e, so always returns "nobody".
39 void caosVM::v_NET_PASS() {
40 result.setString("nobody");
43 /**
44 NET: LINE (command) connect (integer)
45 %status stub
47 Networking is not supported in openc2e, so does nothing.
49 void caosVM::c_NET_LINE() {
50 VM_PARAM_INTEGER(connect)
53 /**
54 NET: LINE (integer)
55 %status stub
57 Networking is not supported in openc2e, so always returns 1.
59 void caosVM::v_NET_LINE() {
60 result.setInt(1);
63 /**
64 NET: ERRA (integer)
65 %status stub
67 Networking is not supported in openc2e, so always returns 0.
69 void caosVM::v_NET_ERRA() {
70 result.setInt(0);
73 /**
74 NET: ULIN (integer) username (string)
75 %status stub
77 Networking is not supported in openc2e, so always returns 0.
79 void caosVM::v_NET_ULIN() {
80 result.setInt(0);
83 /**
84 NET: WHOZ (command)
85 %status stub
87 Networking is not supported in openc2e, so does nothing.
89 void caosVM::c_NET_WHOZ() {
92 /**
93 NET: WHON (command) username (string)
94 %status stub
96 Networking is not supported in openc2e, so does nothing.
98 void caosVM::c_NET_WHON() {
99 VM_PARAM_STRING(username)
103 NET: USER (string)
104 %status stub
106 Networking is not supported in openc2e, so returns an empty string.
108 void caosVM::v_NET_USER() {
109 result.setString("");
113 NET: FROM (string) resource_name (string)
114 %status stub
116 Networking is not supported in openc2e, so returns an empty string.
118 void caosVM::v_NET_FROM() {
119 VM_PARAM_STRING(resource_name)
120 result.setString("");
124 NET: EXPO (integer) chunk_type (string) dest_user (string)
125 %status stub
127 Networking is not supported in openc2e, so always returns 0.
129 void caosVM::v_NET_EXPO() {
130 VM_PARAM_STRING(dest_user)
131 VM_PARAM_STRING(chunk_type)
132 result.setInt(0);
136 NET: RUSO (command) result (variable)
137 %status stub
139 Networking is not supported in openc2e, so sets result to an empty string.
141 void caosVM::c_NET_RUSO() {
142 VM_PARAM_VARIABLE(result)
144 result->setString("");
148 NET: HEAD (command)
149 %status stub
151 Networking is not supported in openc2e, so does nothing.
153 void caosVM::c_NET_HEAD() {
157 NET: HEAR (command) channel (string)
158 %status stub
160 Networking is not supported in openc2e, so does nothing.
162 void caosVM::c_NET_HEAR() {
163 VM_PARAM_STRING(channel)
167 NET: HOST (string)
168 %status stub
170 Networking is not supported in openc2e, so returns an empty string.
172 void caosVM::v_NET_HOST() {
173 result.setString("");
177 NET: RAWE (integer)
178 %status stub
180 Networking is not supported in openc2e, so returns zero.
182 void caosVM::v_NET_RAWE() {
183 result.setInt(0);
187 NET: STAT (command) timeonline (variable) usersonline (variable) bytesreceived (variable) bytessent (variable)
188 %status stub
190 Networking is not supported in openc2e, so sets everything to -1.
192 void caosVM::c_NET_STAT() {
193 VM_PARAM_VARIABLE(bytessent)
194 VM_PARAM_VARIABLE(bytesreceived)
195 VM_PARAM_VARIABLE(usersonline)
196 VM_PARAM_VARIABLE(timeonline)
198 timeonline->setInt(-1);
199 usersonline->setInt(-1);
200 bytesreceived->setInt(-1);
201 bytessent->setInt(-1);
205 NET: UNIK (command) userid (string) result (variable)
206 %status stub
208 Networking is not supported in openc2e, so sets result to an empty string.
210 void caosVM::c_NET_UNIK() {
211 VM_PARAM_VARIABLE(result)
212 VM_PARAM_STRING(userid)
214 result->setString("");
218 NET: WHAT (string)
219 %status stub
221 Networking is not supported in openc2e, so return an empty string.
223 void caosVM::v_NET_WHAT() {
224 result.setString("");
228 NET: WHOD (command)
229 %status stub
231 Networking is not supported in openc2e, so does nothing.
233 void caosVM::c_NET_WHOD() {
237 NET: WHOF (command) user (string)
238 %status stub
240 Networking is not supported in openc2e, so does nothing.
242 void caosVM::c_NET_WHOF() {
243 VM_PARAM_STRING(user)
247 NET: WRIT (command) userid (string) channel (string) messageid (string) param1 (anything) param2 (anything)
248 %status stub
250 Networking is not supported in openc2e, so does nothing.
252 void caosVM::c_NET_WRIT() {
253 VM_PARAM_VALUE(param2)
254 VM_PARAM_VALUE(param1)
255 VM_PARAM_STRING(messageid)
256 VM_PARAM_STRING(channel)
257 VM_PARAM_STRING(userid)
260 /* vim: set noet: */