ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/c_party.C
(Generate patch)

Comparing deliantra/server/server/c_party.C (file contents):
Revision 1.21 by root, Thu Nov 8 19:43:26 2007 UTC vs.
Revision 1.22 by root, Thu Apr 24 04:40:31 2008 UTC

23 23
24#include <global.h> 24#include <global.h>
25#include <sproto.h> 25#include <sproto.h>
26#include <spells.h> 26#include <spells.h>
27 27
28static partylist *firstparty = NULL; /* Keeps track of first party in list */ 28static partylist *firstparty;
29static partylist *lastparty = NULL; /*Keeps track of last party in list */
30 29
31partylist * 30partylist *
32get_firstparty (void) 31get_firstparty (void)
33{ 32{
34 return firstparty; 33 return firstparty;
35} 34}
36 35
37void remove_party (partylist *target_party);
38
39/* Forms the party struct for a party called 'params'. it is the responsibility
40 * of the caller to ensure that the name is unique, and that it is placed in the
41 * main party list correctly */
42static partylist *
43form_party (object *op, const char *params)
44{
45 partylist *newparty;
46
47 newparty = (partylist *) malloc (sizeof (partylist));
48 newparty->partyname = strdup (params);
49 newparty->total_exp = 0;
50 newparty->kills = 0;
51 newparty->passwd[0] = '\0';
52 newparty->next = NULL;
53 newparty->partyleader = strdup (op->name);
54 new_draw_info_format (NDI_UNIQUE, 0, op, "You have formed party: %s", newparty->partyname);
55 op->contr->party = newparty;
56
57 return newparty;
58}
59
60void 36void
61remove_party (partylist *target_party) 37remove_party (partylist *target_party)
62{ 38{
63 partylist *tmpparty;
64 partylist *previousparty;
65 partylist *nextparty;
66
67 if (firstparty == NULL) 39 if (firstparty == NULL)
68 { 40 {
69 LOG (llevError, "remove_party(): I was asked to remove party %s, but no parties are defined", target_party->partyname); 41 LOG (llevError, "remove_party(): I was asked to remove party %s, but no parties are defined", target_party->partyname);
70 return; 42 return;
71 } 43 }
72 44
73 for_all_players (pl) 45 for_all_players (pl)
74 if (pl->party == target_party) 46 if (pl->party == target_party)
75 pl->party = NULL; 47 pl->party = NULL;
76 48
77 /* special case-ism for parties at the beginning and end of the list */ 49 partylist **prevlink = &firstparty;
78 if (target_party == firstparty)
79 {
80 firstparty = firstparty->next;
81 50
82 if (target_party->partyleader) 51 for (partylist *p = firstparty; p; p = p->next)
83 free (target_party->partyleader);
84
85 if (target_party->partyname)
86 free (target_party->partyname);
87
88 free (target_party);
89 return;
90 }
91 else if (target_party == lastparty)
92 {
93 for (tmpparty = firstparty; tmpparty->next != NULL; tmpparty = tmpparty->next)
94 {
95 if (tmpparty->next == target_party)
96 {
97 lastparty = tmpparty;
98
99 if (target_party->partyleader)
100 free (target_party->partyleader);
101
102 if (target_party->partyname)
103 free (target_party->partyname);
104
105 free (target_party);
106 lastparty->next = NULL;
107 return;
108 }
109 }
110 }
111 for (tmpparty = firstparty; tmpparty->next != NULL; tmpparty = tmpparty->next)
112 if (tmpparty->next == target_party) 52 if (p->next == target_party)
113 { 53 {
114 previousparty = tmpparty; 54 prevlink = &p->next;
115 nextparty = tmpparty->next->next;
116 /* this should be safe, because we already dealt with the lastparty case */
117
118 previousparty->next = nextparty;
119 if (target_party->partyleader)
120 free (target_party->partyleader);
121 if (target_party->partyname)
122 free (target_party->partyname);
123 free (target_party);
124 return; 55 break;
125 } 56 }
57
58 *prevlink = target_party->next;
59
60 free (target_party->partyleader);
61 free (target_party->partyname);
62 sfree (target_party);
126} 63}
127 64
128/* Remove unused parties, this could be made to scale a lot better. */ 65/* Remove unused parties, this could be made to scale a lot better. */
129void 66void
130obsolete_parties (void) 67obsolete_parties (void)
133 partylist *party; 70 partylist *party;
134 partylist *next = NULL; 71 partylist *next = NULL;
135 72
136 if (!firstparty) 73 if (!firstparty)
137 return; /* we can't obsolete parties if there aren't any */ 74 return; /* we can't obsolete parties if there aren't any */
75
138 for (party = firstparty; party != NULL; party = next) 76 for (party = firstparty; party != NULL; party = next)
139 { 77 {
140 next = party->next; 78 next = party->next;
141 player_count = 0; 79 player_count = 0;
142 for_all_players (pl) 80 for_all_players (pl)
190 } 128 }
191 return 1; 129 return 1;
192} 130}
193 131
194void 132void
133send_party_message (object *op, const char *msg)
134{
135 for_all_players (pl)
136 if (pl->ob->contr->party == op->contr->party && pl->ob != op)
137 new_draw_info (NDI_WHITE, 0, pl->ob, msg);
138}
139
140void
195receive_party_password (object *op, char k) 141receive_party_password (object *op, char k)
196{ 142{
197 143
198 if (confirm_party_password (op) == 0) 144 if (confirm_party_password (op) == 0)
199 { 145 {
215 op->contr->ns->state = ST_PLAYING; 161 op->contr->ns->state = ST_PLAYING;
216 return; 162 return;
217 } 163 }
218} 164}
219 165
220void
221send_party_message (object *op, char *msg)
222{
223 for_all_players (pl)
224 if (pl->ob->contr->party == op->contr->party && pl->ob != op)
225 new_draw_info (NDI_WHITE, 0, pl->ob, msg);
226}
227
228int 166int
229command_gsay (object *op, char *params) 167command_gsay (object *op, char *params)
230{ 168{
231 char party_params[MAX_BUF]; 169 char party_params[MAX_BUF];
232 170
240} 178}
241 179
242int 180int
243command_party (object *op, char *params) 181command_party (object *op, char *params)
244{ 182{
245 char buf[MAX_BUF]; 183 dynbuf_text buf;
246 partylist *tmpparty, *oldparty; /* For iterating over linked list */ 184 partylist *party = op->contr->party;
247 char *currentparty; /* For iterating over linked list */
248 185
249 if (params == NULL) 186 if (!params)
250 { 187 params = (char *)"";
251 if (op->contr->party == NULL)
252 {
253 new_draw_info (NDI_UNIQUE, 0, op, "You are not a member of any party.");
254 new_draw_info (NDI_UNIQUE, 0, op, "For help try: party help");
255 }
256 else
257 {
258 currentparty = op->contr->party->partyname;
259 new_draw_info_format (NDI_UNIQUE, 0, op, "You are a member of party %s.", currentparty);
260 }
261 return 1;
262 }
263 188
264 if (strcmp (params, "help") == 0) 189 if (!strcmp (params, "help"))
265 { 190 buf << "To form a party type: C<party form> <partyname>\n\n"
266 new_draw_info (NDI_UNIQUE, 0, op, "To form a party type: party form <partyname>"); 191 "To join a party type: C<party join> <partyname>\n\n"
267 new_draw_info (NDI_UNIQUE, 0, op, "To join a party type: party join <partyname>");
268 new_draw_info (NDI_UNIQUE, 0, op, "If the party has a passwd, it will you prompt you for it."); 192 "If the party has a passwd, it will you prompt you for it.\n\n"
269 new_draw_info (NDI_UNIQUE, 0, op, "For a list of current parties type: party list"); 193 "For a list of current parties type: C<party list>\n\n"
270 new_draw_info (NDI_UNIQUE, 0, op, "To leave a party type: party leave"); 194 "To leave a party type: C<party leave>\n\n"
271 new_draw_info (NDI_UNIQUE, 0, op, "To change a passwd for a party type: party passwd <password>"); 195 "To change a passwd for a party type: C<party passwd> <password>\n\n"
272 new_draw_info (NDI_UNIQUE, 0, op, "There is an 8 character max"); 196 "There is an 8 character max\n\n"
273 new_draw_info (NDI_UNIQUE, 0, op, "To talk to party members type: party say <msg>"); 197 "To talk to party members type: C<party say> <msg>\n\n"
274 new_draw_info (NDI_UNIQUE, 0, op, "To see who is in your party: party who"); 198 "To see who is in your party: C<party who>\n\n"
275 new_draw_info (NDI_UNIQUE, 0, op, "To see what you've killed, type: party kills"); 199 "To see what you've killed, type: C<party kills>";
276 return 1;
277 }
278
279 if (!strncmp (params, "kills", 5))
280 {
281 int i, max;
282 char chr;
283 char buffer[80];
284 float exp;
285
286 if (op->contr->party == NULL)
287 {
288 new_draw_info (NDI_UNIQUE, 0, op, "You are not a member of any party.");
289 return 1;
290 }
291 tmpparty = op->contr->party;
292 if (!tmpparty->kills)
293 {
294 new_draw_info (NDI_UNIQUE, 0, op, "You haven't killed anything yet.");
295 return 1;
296 }
297 max = tmpparty->kills - 1;
298 if (max > PARTY_KILL_LOG - 1)
299 max = PARTY_KILL_LOG - 1;
300 new_draw_info (NDI_UNIQUE, 0, op, "Killed | Killer| Exp");
301 new_draw_info (NDI_UNIQUE, 0, op, "----------------+----------------+--------");
302 for (i = 0; i <= max; i++)
303 {
304 exp = tmpparty->party_kills[i].exp;
305 chr = ' ';
306 if (exp > 1000000)
307 {
308 exp /= 1000000;
309 chr = 'M';
310 }
311 else if (exp > 1000)
312 {
313 exp /= 1000;
314 chr = 'k';
315 }
316 sprintf (buffer, "%16s|%16s|%6.1f%c", tmpparty->party_kills[i].dead, tmpparty->party_kills[i].killer, exp, chr);
317 new_draw_info (NDI_UNIQUE, 0, op, buffer);
318 }
319 exp = tmpparty->total_exp;
320 chr = ' ';
321 if (exp > 1000000)
322 {
323 exp /= 1000000;
324 chr = 'M';
325 }
326 else if (exp > 1000)
327 {
328 exp /= 1000;
329 chr = 'k';
330 }
331 new_draw_info (NDI_UNIQUE, 0, op, "----------------+----------------+--------");
332 sprintf (buffer, "Totals: %d kills, %.1f%c exp", tmpparty->kills, exp, chr);
333 new_draw_info (NDI_UNIQUE, 0, op, buffer);
334 return 1;
335 }
336
337 if (strncmp (params, "say ", 4) == 0)
338 {
339 if (op->contr->party == NULL)
340 {
341 new_draw_info (NDI_UNIQUE, 0, op, "You are not a member of any party.");
342 return 1;
343 }
344 params += 4;
345 currentparty = op->contr->party->partyname;
346 snprintf (buf, MAX_BUF - 1, "[%s] %s says: %s", currentparty, &op->name, params);
347 send_party_message (op, buf);
348 new_draw_info_format (NDI_LT_GREEN | NDI_UNIQUE, 0, op, "[%s] You say: %s", currentparty, params);
349 return 1;
350 }
351
352 if (strncmp (params, "form ", 5) == 0) 200 else if (strncmp (params, "form ", 5) == 0)
353 { 201 {
354 int player_count;
355
356 params += 5; 202 params += 5;
357 if (op->contr->party)
358 oldparty = op->contr->party;
359 else
360 oldparty = NULL;
361 203
362 if (firstparty) 204 if (party)
205 buf << "You are already a member of party " << party->partyname << ". You must leave it first.";
206 else
363 { 207 {
364 for (tmpparty = firstparty; tmpparty != NULL; tmpparty = tmpparty->next) 208 for (partylist *tmpparty = firstparty; tmpparty; tmpparty = tmpparty->next)
365 { 209 {
366 if (!strcmp (tmpparty->partyname, params)) 210 if (!strcmp (tmpparty->partyname, params))
367 { 211 {
368 new_draw_info_format (NDI_UNIQUE, 0, op, "The party %s already exists, pick another name", params); 212 buf << "The party " << tmpparty->partyname << " already exists, pick another name";
369 return 1; 213 goto reply;
370 } 214 }
371 } 215 }
372 lastparty->next = form_party (op, params); 216
373 lastparty = lastparty->next; 217 /* Forms the party struct for a party called 'params'. it is the responsibility
374 } 218 * of the caller to ensure that the name is unique, and that it is placed in the
375 else 219 * main party list correctly */
376 { 220
377 firstparty = form_party (op, params); 221 party = salloc0<partylist> ();
222 party->partyname = strdup (params);
223 party->total_exp = 0;
224 party->kills = 0;
225 party->passwd[0] = '\0';
226 party->next = NULL;
227 party->partyleader = strdup (op->name);
228
229 buf << "You have formed party: " << party->partyname << ".";
230
378 lastparty = firstparty; 231 party->next = firstparty;
379 } 232 op->contr->party = firstparty = party;
380 /*
381 * The player might have previously been a member of a party, if so, he will be leaving
382 * it, so check if there are any other members and if not, delete the party
383 */
384 player_count = 0;
385 if (oldparty)
386 {
387 for_all_players (pl)
388 if (pl->party == oldparty)
389 player_count++;
390
391 if (player_count == 0)
392 remove_party (oldparty);
393 }
394
395 return 0;
396 } /* form */
397
398 if (strcmp (params, "leave") == 0)
399 {
400 if (op->contr->party == NULL)
401 {
402 new_draw_info (NDI_UNIQUE, 0, op, "You are not a member of any party.");
403 return 1;
404 }
405 currentparty = op->contr->party->partyname;
406 new_draw_info_format (NDI_UNIQUE, 0, op, "You leave party %s.", currentparty);
407 sprintf (buf, "%s leaves party %s.", &op->name, currentparty);
408 send_party_message (op, buf);
409 op->contr->party = NULL;
410 return 1;
411 }
412
413 if (strcmp (params, "who") == 0)
414 {
415 tmpparty = op->contr->party;
416 if (op->contr->party == NULL)
417 {
418 new_draw_info (NDI_UNIQUE, 0, op, "You are not a member of any party.");
419 return 1;
420 }
421 new_draw_info_format (NDI_UNIQUE, 0, op, "Members of party: %s.", op->contr->party->partyname);
422 for_all_players (pl)
423 if (pl->ob->contr->party == op->contr->party)
424 {
425 if (settings.set_title == TRUE)
426 {
427 if (pl->ob->contr->own_title[0] != '\0')
428 sprintf (buf, "%3d %s the %s", pl->ob->level, &pl->ob->name, pl->ob->contr->own_title);
429 else
430 sprintf (buf, "%3d %s the %s", pl->ob->level, &pl->ob->name, pl->ob->contr->title);
431 }
432 else
433 sprintf (buf, "%3d %s the %s", pl->ob->level, &pl->ob->name, pl->ob->contr->title);
434 new_draw_info (NDI_UNIQUE, 0, op, buf);
435 } 233 }
436 return 1; 234 }
437 } /* leave */ 235 else if (strcmp (params, "list") == 0)
236 {
237 if (!firstparty)
238 buf << "There are no parties active right now";
239 else
240 {
241 buf << "Party name Leader\n\n"
242 "---------- ------\n\n";
438 243
244 for (partylist *p = firstparty; p; p = p->next)
245 buf.printf ("%-32s %s\n\n", p->partyname, p->partyleader);
246 }
247 }
439 if (strncmp (params, "passwd ", 7) == 0) 248 else if (strncmp (params, "join ", 5) == 0)
440 { 249 {
441 partylist *tmplist;
442
443 params += 7; 250 params += 5;
444 251
445 if (op->contr->party == NULL) 252 /* Can't join a party cause non exist */
446 { 253 if (!firstparty)
447 new_draw_info (NDI_UNIQUE, 0, op, "You are not a member of a party"); 254 buf << "Party: " << params << " does not exist. You must form it first.";
448 return 1; 255 else if (party)
449 } 256 buf << "You are already a member of party " << party->partyname << ". You must leave it first.";
450 257 else
451 if (strlen (params) > 8) 258 for (partylist *p = firstparty; p; p = p->next)
452 { 259 if (!strcmp (p->partyname, params))
453 new_draw_info (NDI_UNIQUE, 0, op, "The password must not exceed 8 characters");
454 return 1;
455 }
456
457 tmplist = firstparty;
458 while (tmplist != NULL)
459 {
460 if (tmplist == op->contr->party)
461 { 260 {
462 strcpy (tmplist->passwd, params); 261 if (!*p->passwd)
463 new_draw_info_format (NDI_UNIQUE, 0, op, "The password for party %s is %s", tmplist->partyname, tmplist->passwd); 262 {
464 snprintf (buf, MAX_BUF, "Password for party %s is now %s, changed by %s", tmplist->partyname, tmplist->passwd, &op->name); 263 op->contr->party = p;
264
265 buf << op->name << " joins party " << p->partyname << ".";
465 send_party_message (op, buf); 266 send_party_message (op, buf);
466 return 0; 267 buf.clear ();
268
269 buf << "You have joined party: " << p->partyname << ".";
467 } 270 }
468 tmplist = tmplist->next;
469 }
470 return 0;
471 } /* passwd */
472
473 if (strcmp (params, "list") == 0)
474 {
475 partylist *tmplist;
476
477 tmplist = firstparty;
478
479 if (firstparty == NULL)
480 {
481 new_draw_info (NDI_UNIQUE, 0, op, "There are no parties active right now");
482 return 1;
483 }
484
485 new_draw_info (NDI_UNIQUE, 0, op, "Party name Leader");
486 new_draw_info (NDI_UNIQUE, 0, op, "---------- ------");
487
488 while (tmplist != NULL)
489 {
490 new_draw_info_format (NDI_UNIQUE, 0, op, "%-32s %s", tmplist->partyname, tmplist->partyleader);
491 tmplist = tmplist->next;
492 }
493 return 0;
494 } /* list */
495
496 if (strncmp (params, "join ", 5) == 0)
497 {
498
499 params += 5;
500
501 /* Can't join a party cause non exist */
502 if (firstparty == NULL)
503 {
504 new_draw_info_format (NDI_UNIQUE, 0, op, "Party: %s does not exist. You must form it first", params);
505 return 1;
506 }
507
508 /* Special case if thier is only one party */
509 if (firstparty->next == NULL)
510 {
511 if (strcmp (firstparty->partyname, params) != 0)
512 { 271 else
513 new_draw_info_format (NDI_UNIQUE, 0, op, "Party: %s does not exist. You must form it first", params); 272 get_party_password (op, p);
514 return 1; 273
274 goto reply;
515 } 275 }
516 else 276 else
277 buf << "Party " << params << " does not exist. You must form it first.";
278 }
279 else if (!party)
280 buf << "You are not a member of any party.\n\n"
281 "For help try: C<party help>";
282 else if (!*params)
283 buf << "You are a member of party " << party->partyname << ".";
284 else if (!strncmp (params, "kills", 5))
285 {
286 if (!party->kills)
287 buf << "You haven't killed anything yet.";
288 else
289 {
290 int max = min (party->kills - 1, PARTY_KILL_LOG - 1);
291
292 buf << "Killed | Killer| Exp\n\n"
293 << "----------------+----------------+--------\n\n";
294
295 for (int i = 0; i <= max; i++)
517 { 296 {
518 if (op->contr->party == firstparty) 297 sint64 exp = party->party_kills[i].exp;
298 char suffix = ' ';
299 if (exp > 1000000)
519 { 300 {
520 new_draw_info_format (NDI_UNIQUE, 0, op, "You are already in party: %s", firstparty->partyname); 301 exp /= 1000000;
521 return 1; 302 suffix = 'M';
522 } 303 }
523 /* found party player wants to join */ 304 else if (exp > 1000)
524 if (firstparty->passwd[0] == '\0')
525 { 305 {
526 op->contr->party = firstparty; 306 exp /= 1000;
527 new_draw_info_format (NDI_UNIQUE, 0, op, "You have joined party: %s", firstparty->partyname); 307 suffix = 'k';
528 snprintf (buf, MAX_BUF, "%s joins party %s", &op->name, firstparty->partyname);
529 send_party_message (op, buf);
530 return 0;
531 } 308 }
532 else 309
533 { 310 buf.printf ("%16s|%16s|%6.1f%c\n\n", party->party_kills[i].dead, party->party_kills[i].killer, (double)exp, suffix);
534 get_party_password (op, firstparty);
535 return 0;
536 }
537 } 311 }
538 }
539 312
540 tmpparty = firstparty; 313 buf << "----------------+----------------+--------\n\n";
541 while (tmpparty != NULL) 314
542 {
543 if (strcmp (tmpparty->partyname, params) == 0)
544 { 315 {
545 if (op->contr->party == tmpparty) 316 sint64 exp = party->total_exp;
317 char suffix = ' ';
318
319 if (exp > 1000000)
546 { 320 {
547 new_draw_info_format (NDI_UNIQUE, 0, op, "You are already a member of party: %s", tmpparty->partyname); 321 exp /= 1000000;
548 return 1; 322 suffix = 'M';
549 } 323 }
550 else 324 else if (exp > 1000)
551 { 325 {
552 if (tmpparty->passwd[0] == '\0') 326 exp /= 1000;
553 { 327 suffix = 'k';
554 new_draw_info_format (NDI_UNIQUE, 0, op, "You have joined party: %s", tmpparty->partyname);
555 op->contr->party = tmpparty;
556 snprintf (buf, MAX_BUF, "%s joins party %s", &op->name, tmpparty->partyname);
557 send_party_message (op, buf);
558 return 0;
559 }
560 else
561 {
562 get_party_password (op, tmpparty);
563 return 0;
564 }
565 } 328 }
329
330 buf.printf ("Totals: %d kills, %.1f%c exp", party->kills, (double)exp, suffix);
566 } 331 }
332 }
333 }
334 else if (strncmp (params, "say ", 4) == 0)
335 {
336 params += 4;
337
338 buf << "[" << party->partyname << "] " << op->name << " says: " << params;
339 send_party_message (op, buf);
340 buf.clear ();
341
342 buf << "[" << party->partyname << "] You say: " << params;
343 }
344 else if (strcmp (params, "leave") == 0)
345 {
346 buf << op->name << " leaves party " << party->partyname << ".";
347 send_party_message (op, buf);
348 buf.clear ();
349
350 buf << "You leave party " << party->partyname << ".";
351
352 op->contr->party = 0;
353 obsolete_parties ();
354 }
355 else if (strcmp (params, "who") == 0)
356 {
357 buf << "Members of party " << party->partyname << ".\n\n";
358
359 for_all_players (pl)
360 if (pl->ob->contr->party == party)
361 buf.printf ("%s/%d %s", &pl->ob->name, pl->ob->level,
362 *pl->ob->contr->own_title ? pl->ob->contr->own_title : pl->ob->contr->title);
363 }
364 else if (strncmp (params, "passwd ", 7) == 0)
365 {
366 params += 7;
367
368 if (strlen (params) > 8)
369 buf << "The password must not exceed 8 characters";
567 else 370 else
568 tmpparty = tmpparty->next;
569 } 371 {
372 strcpy (party->passwd, params);
373 buf << "The password for party " << party->partyname << " is set to B<" << params << "> by " << &op->name;
374 }
375 }
376 else
377 buf << "I did not understand your command. For help try: C<party help>";
570 378
571 new_draw_info_format (NDI_UNIQUE, 0, op, "Party %s does not exist. You must form it first.", params); 379reply:
572 return 1; 380 op->contr->send_msg (NDI_UNIQUE | NDI_REPLY, MSG_CHANNEL("party"), buf);
573 } /* join */
574 381
575 new_draw_info (NDI_UNIQUE, 0, op, "To form a party type: party form <partyname>");
576 new_draw_info (NDI_UNIQUE, 0, op, "To join a party type: party join <partyname>");
577 new_draw_info (NDI_UNIQUE, 0, op, "If the party has a passwd, it will you prompt you for it.");
578 new_draw_info (NDI_UNIQUE, 0, op, "For a list of current parties type: party list");
579 new_draw_info (NDI_UNIQUE, 0, op, "To leave a party type: party leave");
580 new_draw_info (NDI_UNIQUE, 0, op, "To change a passwd for a party type: party passwd <password>");
581 new_draw_info (NDI_UNIQUE, 0, op, "There is an 8 character max");
582 new_draw_info (NDI_UNIQUE, 0, op, "To talk to party members type: party say <msg>");
583 new_draw_info (NDI_UNIQUE, 0, op, "To see who is in your party: party who");
584 new_draw_info (NDI_UNIQUE, 0, op, "To see what you've killed, type: party kills");
585 return 1; 382 return 1;
586} 383}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines