[go: up one dir, main page]

Menu

[ab7a0e]: / src / server_events.cc  Maximize  Restore  History

Download this file

724 lines (647 with data), 20.8 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
/**
* server_events.cc
* This is the implementation file for the xServer class.
* This class is the entity which is the GNUWorld server
* proper. It manages network I/O, parsing and distributing
* incoming messages, notifying attached clients of
* system events, on, and on, and on.
*
* Copyright (C) 2002 Daniel Karrels <dan@karrels.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*
* $Id: server_events.cc,v 1.3 2005/09/29 17:40:06 kewlio Exp $
*/
#include <new>
#include <string>
#include <list>
#include <stack>
#include <iostream>
#include <csignal>
#include "server.h"
#include "Network.h"
#include "iClient.h"
#include "ELog.h"
RCSTAG( "$Id: server_events.cc,v 1.3 2005/09/29 17:40:06 kewlio Exp $" ) ;
namespace gnuworld
{
using std::list ;
using std::endl ;
using std::stack ;
using std::string ;
/**
* This method will register the given xClient to receive
* all events of the given type.
* Available events are listed in include/events.h
*/
bool xServer::RegisterEvent( const eventType& theEvent,
xClient* theClient )
{
assert( theClient != NULL ) ;
// Make sure that the given event is valid
// (in the interval of possible events).
if( !validEvent( theEvent ) )
{
return false ;
}
// Make sure not to add a client more than once
UnRegisterEvent( theEvent, theClient ) ;
// Add this client as listener for this event
eventList[ theEvent ].push_back( theClient ) ;
// Registration succeeded
return true ;
}
/**
* This method will register the given xClient for any
* channel event that occurs in channel chanName, case
* insensitive.
*/
bool xServer::RegisterChannelEvent( const string& chanName,
xClient* theClient )
{
assert( theClient != NULL ) ;
// Prevent duplicates of the same channel/client pair
UnRegisterChannelEvent( chanName, theClient ) ;
// Obtain a pointer to the list of xClient's registered for events
// on the given channel.
channelEventMapType::iterator chanPtr = channelEventMap.find( chanName ) ;
if( chanPtr == channelEventMap.end() )
{
// Channel event list doesn't exist yet
channelEventMap.insert( channelEventMapType::value_type( chanName,
new list< xClient* > ) ) ;
chanPtr = channelEventMap.find( chanName ) ;
}
// Add the xClient as a listener for events in this channel.
chanPtr->second->push_back( theClient ) ;
// Addition successful
return true ;
}
/**
* This method will attempt to unregister the given client
* from receiving events of type theEvent.
* It will fail (return false) when theEvent is not valid, or
* the xClient is not found as being registered for
* event theEvent.
*/
bool xServer::UnRegisterEvent( const eventType& theEvent, xClient* theClient )
{
assert( theClient != NULL ) ;
// Make sure this is a valid event.
if( !validEvent( theEvent ) )
{
return false ;
}
// Iterate through the list of registered listeners for
// this event and attempt to find the xClient wishing to be removed.
//
list< xClient* >::iterator ptr = eventList[ theEvent ].begin(),
end = eventList[ theEvent ].end() ;
// Continue until we find the xClient.
// Since each xClient may only be registered for any given
// we may return as soon as we find the client.
while( ptr != end )
{
// Is this the one?
if( (*ptr) == theClient )
{
// Yup, remove it and return true
eventList[ theEvent ].erase( ptr ) ;
return true ;
}
++ptr ;
}
// Unable to find the client in the list of registered
// listeners for this event. *shrug*
return false ;
}
/**
* This method will stop the given xClient from receiving any
* events in the channel chanName, case insensitive.
*/
bool xServer::UnRegisterChannelEvent( const string& chanName,
xClient* theClient )
{
assert( theClient != NULL ) ;
channelEventMapType::iterator chanPtr = channelEventMap.find( chanName ) ;
if( chanPtr == channelEventMap.end() )
{
// Channel has no xClient's registered for channel events
// No big deal.
return true ;
}
list< xClient* >* listPtr = chanPtr->second ;
for( list< xClient* >::iterator ptr = listPtr->begin(), end = listPtr->end() ;
ptr != end ; ++ptr )
{
if( *ptr == theClient )
{
listPtr->erase( ptr ) ;
// Are there any listeners remaining for this channel?
if( listPtr->empty() )
{
// Nope, remove the listener list from the
// channelEventMap and deallocat the list.
channelEventMap.erase( chanName ) ;
delete listPtr ;
}
return true ;
}
}
// Unable to find the key/xClient pair.
return false ;
}
/**
* This method will distribute to each xClient listening
* for the given event (theEvent) an event with the proper
* arguments.
* Events are not guaranteed to be distributed in any
* particular order.
*/
void xServer::PostEvent( const eventType& theEvent,
void* Data1, void* Data2,
void* Data3, void* Data4,
const xClient* excludeMe )
{
// Make sure the event is valid.
if( !validEvent( theEvent ) )
{
elog << "xServer::PostEvent> Invalid event number: "
<< theEvent
<< endl ;
return ;
}
// Iterate through the list of listeners for this event.
list< xClient* >::iterator ptr = eventList[ theEvent ].begin(),
end = eventList[ theEvent ].end() ;
// Continue while there are more listeners for this event.
for( ; ptr != end ; ++ptr )
{
// Notify this client of the event
// if he didnt cause the event to trigger
if( (*ptr) != excludeMe )
{
(*ptr)->OnEvent( theEvent, Data1, Data2, Data3, Data4 ) ;
}
}
}
/**
* This method will distribute to any xClient registered to
* receive events for the given channel (chanName), case
* insensitive, an event with the proper arguments.
* Events are not guaranteed to be distributed in any
* particular order.
*/
void xServer::PostChannelEvent( const channelEventType& theEvent,
Channel* theChan,
void* Data1, void* Data2,
void* Data3, void* Data4 )
{
assert( theChan != 0 ) ;
// First deliver this channel event to any listeners for all channel
// events.
channelEventMapType::iterator allChanPtr =
channelEventMap.find( CHANNEL_ALL ) ;
if( allChanPtr != channelEventMap.end() )
{
for( list< xClient* >::iterator ptr = allChanPtr->second->begin(),
endPtr = allChanPtr->second->end() ; ptr != endPtr ; ++ptr )
{
(*ptr)->OnChannelEvent( theEvent, theChan,
Data1, Data2, Data3, Data4 ) ;
}
}
// Find listeners for this specific channel
channelEventMapType::iterator chanPtr =
channelEventMap.find( theChan->getName() ) ;
if( chanPtr == channelEventMap.end() )
{
// No listeners for this channel's events
return ;
}
// Iterate through the listeners for this channel's events
// and notify each listener of the event
list< xClient* >* listPtr = chanPtr->second ;
for( list< xClient* >::iterator ptr = listPtr->begin(), end = listPtr->end() ;
ptr != end ; ++ptr )
{
(*ptr)->OnChannelEvent( theEvent, theChan,
Data1, Data2, Data3, Data4 ) ;
}
}
// srcClient may be NULL, when the source is a server
void xServer::PostChannelKick( Channel* theChan,
iClient* srcClient,
iClient* destClient,
const string& kickMessage,
bool authoritative )
{
// Public method, verify arguments
assert( theChan != 0 ) ;
assert( destClient != 0 ) ;
// First deliver this channel event to any listeners for all channel
// events.
channelEventMapType::iterator allChanPtr =
channelEventMap.find( CHANNEL_ALL ) ;
if( allChanPtr != channelEventMap.end() )
{
for( list< xClient* >::iterator ptr = allChanPtr->second->begin(),
endPtr = allChanPtr->second->end() ; ptr != endPtr ; ++ptr )
{
(*ptr)->OnNetworkKick( theChan,
srcClient,
destClient,
kickMessage,
authoritative ) ;
}
}
// Find listeners for this specific channel
channelEventMapType::iterator chanPtr =
channelEventMap.find( theChan->getName() ) ;
if( chanPtr == channelEventMap.end() )
{
// No listeners for this channel's events
return ;
}
// Iterate through the listeners for this channel's events
// and notify each listener of the event
list< xClient* >* listPtr = chanPtr->second ;
for( list< xClient* >::iterator ptr = listPtr->begin(), end = listPtr->end() ;
ptr != end ; ++ptr )
{
(*ptr)->OnNetworkKick( theChan,
srcClient,
destClient,
kickMessage,
authoritative ) ;
}
}
bool xServer::PostSignal( int whichSig )
{
// First, notify the server signal handler
bool handledSignal = OnSignal( whichSig ) ;
// Pass this signal on to each xClient.
xNetwork::localClientIterator ptr = Network->localClient_begin() ;
for( ; ptr != Network->localClient_end() ; ++ptr )
{
// if( NULL == *ptr )
// {
// continue ;
// }
ptr->second->OnSignal( whichSig ) ;
}
return handledSignal ;
}
bool xServer::OnSignal( int whichSig )
{
bool retMe = false ;
switch( whichSig )
{
case SIGUSR1:
dumpStats() ;
retMe = true ;
break ;
case SIGHUP:
retMe = true ;
break ;
case SIGUSR2:
retMe = true;
break ;
case SIGINT:
case SIGTERM:
Shutdown() ;
retMe = true ;
break ;
default:
break ;
}
return retMe ;
}
// Handle a channel mode change
// theChan is the channel on which the mode change occured
// sourceUser is the source of the mode change; this variable
// may be NULL if a server is setting the mode
// modeVector contains pairs of bool (polarity) and Channel::modeType
// (which mode).
// This method is invoked only for simple (no argument) modes.
void xServer::OnChannelMode( Channel* theChan, ChannelUser* sourceUser,
const xServer::modeVectorType& modeVector )
{
theChan->onMode( modeVector ) ;
// First deliver this channel event to any listeners for all channel
// events.
channelEventMapType::iterator allChanPtr =
channelEventMap.find( CHANNEL_ALL ) ;
if( allChanPtr != channelEventMap.end() )
{
for( list< xClient* >::iterator ptr = allChanPtr->second->begin(),
endPtr = allChanPtr->second->end() ; ptr != endPtr ; ++ptr )
{
(*ptr)->OnChannelMode( theChan, sourceUser, modeVector ) ;
}
}
// Find listeners for this specific channel
channelEventMapType::iterator chanPtr =
channelEventMap.find( theChan->getName() ) ;
if( chanPtr == channelEventMap.end() )
{
// No listeners for this channel's events
return ;
}
// Iterate through the listeners for this channel's events
// and notify each listener of the event
list< xClient* >* listPtr = chanPtr->second ;
for( list< xClient* >::iterator ptr = listPtr->begin(), end = listPtr->end() ;
ptr != end ; ++ptr )
{
(*ptr)->OnChannelMode( theChan, sourceUser, modeVector ) ;
}
}
// Handle a channel mode change
// theChan is the channel on which the mode change occured
// polarity is true if the mode is being set, false otherwise
// sourceUser is the source of the mode change; this variable
// may be NULL if a server is setting the mode
void xServer::OnChannelModeL( Channel* theChan, bool polarity,
ChannelUser* sourceUser, unsigned int limit )
{
theChan->onModeL( polarity, limit ) ;
// First deliver this channel event to any listeners for all channel
// events.
channelEventMapType::iterator allChanPtr =
channelEventMap.find( CHANNEL_ALL ) ;
if( allChanPtr != channelEventMap.end() )
{
for( list< xClient* >::iterator ptr = allChanPtr->second->begin(),
endPtr = allChanPtr->second->end() ; ptr != endPtr ; ++ptr )
{
(*ptr)->OnChannelModeL( theChan, polarity,
sourceUser, limit ) ;
}
}
// Find listeners for this specific channel
channelEventMapType::iterator chanPtr =
channelEventMap.find( theChan->getName() ) ;
if( chanPtr == channelEventMap.end() )
{
// No listeners for this channel's events
return ;
}
// Iterate through the listeners for this channel's events
// and notify each listener of the event
list< xClient* >* listPtr = chanPtr->second ;
for( list< xClient* >::iterator ptr = listPtr->begin(), end = listPtr->end() ;
ptr != end ; ++ptr )
{
(*ptr)->OnChannelModeL( theChan, polarity, sourceUser, limit ) ;
}
}
// Handle a channel mode change
// theChan is the channel on which the mode change occured
// polarity is true if the mode is being set, false otherwise
// sourceUser is the source of the mode change; this variable
// may be NULL if a server is setting the mode
void xServer::OnChannelModeK( Channel* theChan, bool polarity,
ChannelUser* sourceUser, const string& key )
{
theChan->onModeK( polarity, key ) ;
// First deliver this channel event to any listeners for all channel
// events.
channelEventMapType::iterator allChanPtr =
channelEventMap.find( CHANNEL_ALL ) ;
if( allChanPtr != channelEventMap.end() )
{
for( list< xClient* >::iterator ptr = allChanPtr->second->begin(),
endPtr = allChanPtr->second->end() ; ptr != endPtr ; ++ptr )
{
(*ptr)->OnChannelModeK( theChan, polarity,
sourceUser, key ) ;
}
}
// Find listeners for this specific channel
channelEventMapType::iterator chanPtr =
channelEventMap.find( theChan->getName() ) ;
if( chanPtr == channelEventMap.end() )
{
// No listeners for this channel's events
return ;
}
// Iterate through the listeners for this channel's events
// and notify each listener of the event
list< xClient* >* listPtr = chanPtr->second ;
for( list< xClient* >::iterator ptr = listPtr->begin(), end = listPtr->end() ;
ptr != end ; ++ptr )
{
(*ptr)->OnChannelModeK( theChan, polarity, sourceUser, key ) ;
}
}
// Handle a channel mode change
// theChan is the channel on which the mode change occured
// polarity is true if the mode is being set, false otherwise
// sourceUser is the source of the mode change; this variable
// may be NULL if a server is setting the mode
void xServer::OnChannelModeA( Channel* theChan, bool polarity,
ChannelUser* sourceUser, const string& Apass )
{
theChan->onModeA( polarity, Apass ) ;
// First delivery this channel event to any listeners for all channel
// events.
channelEventMapType::iterator allChanPtr =
channelEventMap.find( CHANNEL_ALL ) ;
if( allChanPtr != channelEventMap.end() )
{
for( list< xClient* >::iterator ptr = allChanPtr->second->begin(),
endPtr = allChanPtr->second->end() ; ptr != endPtr ; ++ptr )
{
(*ptr)->OnChannelModeA( theChan, polarity,
sourceUser, Apass ) ;
}
}
// Find listeners for this specific channel
channelEventMapType::iterator chanPtr =
channelEventMap.find( theChan->getName() ) ;
if( chanPtr == channelEventMap.end() )
{
// No listeners for this channel's events
return ;
}
// Iterate through the listeners fort his channel's events
// and notify each listener of the event
list< xClient* >* listPtr = chanPtr->second;
for( list< xClient* >::iterator ptr = listPtr->begin(), end = listPtr->end() ;
ptr != end ; ++ ptr )
{
(*ptr)->OnChannelModeA( theChan, polarity, sourceUser, Apass ) ;
}
}
// Handle a channel mode change
// theChan is the channel on which the mode change occured
// polarity is true if the mode is being set, false otherwise
// sourceUser is the source of the mode change; this variable
// may be NULL if a server is setting the mode
void xServer::OnChannelModeU( Channel* theChan, bool polarity,
ChannelUser* sourceUser, const string& Upass )
{
theChan->onModeU( polarity, Upass ) ;
// First deliver this channel event to any listeners for all channel
// events.
channelEventMapType::iterator allChanPtr =
channelEventMap.find( CHANNEL_ALL ) ;
if( allChanPtr != channelEventMap.end() )
{
for( list< xClient* >::iterator ptr = allChanPtr->second->begin(),
endPtr = allChanPtr->second->end() ; ptr != endPtr ; ++ptr )
{
(*ptr)->OnChannelModeU( theChan, polarity,
sourceUser, Upass ) ;
}
}
// Find listeners for this specific channel
channelEventMapType::iterator chanPtr =
channelEventMap.find( theChan->getName() ) ;
if( chanPtr == channelEventMap.end() )
{
// No listeners for this channel's events
return ;
}
// Iterate through the listenersfor this channel's events
// and notify each listener of the event
list< xClient* >* listPtr = chanPtr->second ;
for( list< xClient* >::iterator ptr = listPtr->begin(), end = listPtr->end() ;
ptr != end ; ++ptr )
{
(*ptr)->OnChannelModeU( theChan, polarity, sourceUser, Upass ) ;
}
}
// Handle a channel mode change
// theChan is the channel on which the mode change occurs
// polarity is true if the mode is being set, false otherwise
// sourceUser is the source of the mode change; this variable
// may be NULL if a server is setting the mode
void xServer::OnChannelModeO( Channel* theChan, ChannelUser* sourceUser,
const xServer::opVectorType& opVector )
{
theChan->onModeO( opVector ) ;
// First deliver this channel event to any listeners for all channel
// events.
channelEventMapType::iterator allChanPtr =
channelEventMap.find( CHANNEL_ALL ) ;
if( allChanPtr != channelEventMap.end() )
{
for( list< xClient* >::iterator ptr = allChanPtr->second->begin(),
endPtr = allChanPtr->second->end() ; ptr != endPtr ; ++ptr )
{
(*ptr)->OnChannelModeO( theChan, sourceUser, opVector ) ;
}
}
// Find listeners for this specific channel
channelEventMapType::iterator chanPtr =
channelEventMap.find( theChan->getName() ) ;
if( chanPtr == channelEventMap.end() )
{
// No listeners for this channel's events
return ;
}
// Iterate through the listeners for this channel's events
// and notify each listener of the event
list< xClient* >* listPtr = chanPtr->second ;
for( list< xClient* >::iterator ptr = listPtr->begin(), end = listPtr->end() ;
ptr != end ; ++ptr )
{
(*ptr)->OnChannelModeO( theChan, sourceUser, opVector ) ;
}
}
// Handle a channel mode change
// theChan is the channel on which the mode change occured
// polarity is true if the mode is being set, false otherwise
// sourceUser is the source of the mode change; this variable
// may be NULL if a server is setting the mode
void xServer::OnChannelModeV( Channel* theChan, ChannelUser* sourceUser,
const xServer::voiceVectorType& voiceVector )
{
theChan->onModeV( voiceVector ) ;
// First deliver this channel event to any listeners for all channel
// events.
channelEventMapType::iterator allChanPtr =
channelEventMap.find( CHANNEL_ALL ) ;
if( allChanPtr != channelEventMap.end() )
{
for( list< xClient* >::iterator ptr = allChanPtr->second->begin(),
endPtr = allChanPtr->second->end() ; ptr != endPtr ; ++ptr )
{
(*ptr)->OnChannelModeV( theChan, sourceUser,
voiceVector ) ;
}
}
// Find listeners for this specific channel
channelEventMapType::iterator chanPtr =
channelEventMap.find( theChan->getName() ) ;
if( chanPtr == channelEventMap.end() )
{
// No listeners for this channel's events
return ;
}
// Iterate through the listeners for this channel's events
// and notify each listener of the event
list< xClient* >* listPtr = chanPtr->second ;
for( list< xClient* >::iterator ptr = listPtr->begin(), end = listPtr->end() ;
ptr != end ; ++ptr )
{
(*ptr)->OnChannelModeV( theChan, sourceUser, voiceVector ) ;
}
}
// Handle a channel mode change
// theChan is the channel on which the mode change occured
// polarity is true if the mode is being set, false otherwise
// sourceUser is the source of the mode change; this variable
// may be NULL if a server is setting the mode
void xServer::OnChannelModeB( Channel* theChan, ChannelUser* sourceUser,
xServer::banVectorType& banVector )
{
// Channel::onModeB() may modify banVector with the extra bans
// that have been removed due to overlaps
theChan->onModeB( banVector ) ;
// First deliver this channel event to any listeners for all channel
// events.
channelEventMapType::iterator allChanPtr =
channelEventMap.find( CHANNEL_ALL ) ;
if( allChanPtr != channelEventMap.end() )
{
for( list< xClient* >::iterator ptr = allChanPtr->second->begin(),
endPtr = allChanPtr->second->end() ; ptr != endPtr ; ++ptr )
{
(*ptr)->OnChannelModeB( theChan, sourceUser,
banVector ) ;
}
}
// Find listeners for this specific channel
channelEventMapType::iterator chanPtr =
channelEventMap.find( theChan->getName() ) ;
if( chanPtr == channelEventMap.end() )
{
// No listeners for this channel's events
return ;
}
// Iterate through the listeners for this channel's events
// and notify each listener of the event
list< xClient* >* listPtr = chanPtr->second ;
for( list< xClient* >::iterator ptr = listPtr->begin(), end = listPtr->end() ;
ptr != end ; ++ptr )
{
(*ptr)->OnChannelModeB( theChan, sourceUser, banVector ) ;
}
}
} // namespace gnuworld