This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.
00468 {
-00469 Write(Socket,"%s",s.c_str());
-00470 }
+Definition at line 505 of file modules.cpp.00506 {
+00507 Write(Socket,"%s",s.c_str());
+00508 }
@@ -2383,16 +2472,16 @@ Sends text from a user to a channel (mulicast).
This method writes a line of text to a channel, with the given user's nick/ident /host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in MODE (see RFC 1459).
-Definition at line 501 of file modules.cpp.
00502 {
-00503 if (IncludeSender)
-00504 {
-00505 WriteChannel(Channel,User,"%s",s.c_str());
-00506 }
-00507 else
-00508 {
-00509 ChanExceptSender(Channel,User,"%s",s.c_str());
-00510 }
-00511 }
+Definition at line 539 of file modules.cpp.00540 {
+00541 if (IncludeSender)
+00542 {
+00543 WriteChannel(Channel,User,"%s",s.c_str());
+00544 }
+00545 else
+00546 {
+00547 ChanExceptSender(Channel,User,"%s",s.c_str());
+00548 }
+00549 }
@@ -2442,9 +2531,9 @@ Writes text to a channel, but from a server, including all.
This can be used to send server notices to a group of users.
-Definition at line 496 of file modules.cpp.
00497 {
-00498 WriteChannelWithServ((char*)ServName.c_str(), Channel, "%s", text.c_str());
-00499 }
+Definition at line 534 of file modules.cpp.00535 {
+00536 WriteChannelWithServ((char*)ServName.c_str(), Channel, "%s", text.c_str());
+00537 }
@@ -2494,16 +2583,16 @@ Sends text from a user to one or more channels (mulicast).
This method writes a line of text to all users which share a common channel with a given user, with the user's nick/ident/host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in NICK (see RFC 1459). Otherwise, it is only sent to the other recipients, as seen in QUIT.
-Definition at line 518 of file modules.cpp.
00519 {
-00520 if (IncludeSender)
-00521 {
-00522 WriteCommon(User,"%s",text.c_str());
-00523 }
-00524 else
-00525 {
-00526 WriteCommonExcept(User,"%s",text.c_str());
-00527 }
-00528 }
+Definition at line 556 of file modules.cpp.00557 {
+00558 if (IncludeSender)
+00559 {
+00560 WriteCommon(User,"%s",text.c_str());
+00561 }
+00562 else
+00563 {
+00564 WriteCommonExcept(User,"%s",text.c_str());
+00565 }
+00566 }
@@ -2553,9 +2642,9 @@ Sends text from a user to a socket.
This method writes a line of text to an established socket, with the given user's nick/ident /host combination prepended, as used in PRIVSG etc commands (see RFC 1459)
-Definition at line 477 of file modules.cpp.
00478 {
-00479 WriteFrom(Socket,User,"%s",s.c_str());
-00480 }
+Definition at line 515 of file modules.cpp.00516 {
+00517 WriteFrom(Socket,User,"%s",s.c_str());
+00518 }
@@ -2612,11 +2701,11 @@ modes[2] = user->nick;
Srv->SendMode(modes,3,user);
The modes will originate from the server where the command was issued, however responses (e.g. numerics) will be sent to the user you provide as the third parameter. You must be sure to get the number of parameters correct in the pcnt parameter otherwise you could leave your server in an unstable state!
-Definition at line 462 of file modules.cpp.
+Definition at line 500 of file modules.cpp.
-References server_mode().
00463 {
-00464 server_mode(parameters,pcnt,user);
-00465 }
+References server_mode().00501 {
+00502 server_mode(parameters,pcnt,user);
+00503 }
@@ -2651,9 +2740,9 @@ Sends text to all opers.
This method sends a server notice to all opers with the usermode +s.
-Definition at line 392 of file modules.cpp.
00393 {
-00394 WriteOpers("%s",s.c_str());
-00395 }
+Definition at line 425 of file modules.cpp.00426 {
+00427 WriteOpers("%s",s.c_str());
+00428 }
@@ -2697,9 +2786,9 @@ Sends text from the server to a socket.
This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)
-Definition at line 472 of file modules.cpp.
00473 {
-00474 WriteServ(Socket,"%s",s.c_str());
-00475 }
+Definition at line 510 of file modules.cpp.00511 {
+00512 WriteServ(Socket,"%s",s.c_str());
+00513 }
@@ -2753,20 +2842,20 @@ The format will become:
:localserver TEXT
Which is useful for numerics and server notices to single users, etc.
-Definition at line 482 of file modules.cpp.
-
-References connection::fd.
00483 {
-00484 if (!Source)
-00485 {
-00486
-00487 Write(Dest->fd,":%s %s",this->GetServerName().c_str(),s.c_str());
-00488 }
-00489 else
-00490 {
-00491
-00492 WriteTo(Source,Dest,"%s",s.c_str());
-00493 }
-00494 }
+Definition at line 520 of file modules.cpp.
+
+References connection::fd.
00521 {
+00522 if (!Source)
+00523 {
+00524
+00525 Write(Dest->fd,":%s %s",this->GetServerName().c_str(),s.c_str());
+00526 }
+00527 else
+00528 {
+00529
+00530 WriteTo(Source,Dest,"%s",s.c_str());
+00531 }
+00532 }
@@ -2818,9 +2907,9 @@ These can be RFC specified modes such as +i, or module provided modes, including
Serv->SendToModeMask("xi", WM_OR, "m00");
Then the text 'm00' will be sent to all users with EITHER mode x or i. Conversely if you used WM_AND, the user must have both modes set to receive the message.
-Definition at line 405 of file modules.cpp.
00406 {
-00407 WriteMode(modes.c_str(),flags,"%s",text.c_str());
-00408 }
+Definition at line 438 of file modules.cpp.00439 {
+00440 WriteMode(modes.c_str(),flags,"%s",text.c_str());
+00441 }
@@ -2864,9 +2953,9 @@ Sends a WALLOPS message.
This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.
-Definition at line 530 of file modules.cpp.
00531 {
-00532 WriteWallOps(User,false,"%s",text.c_str());
-00533 }
+Definition at line 568 of file modules.cpp.00569 {
+00570 WriteWallOps(User,false,"%s",text.c_str());
+00571 }
@@ -2910,37 +2999,37 @@ Remove a user's connection to the irc server, but leave their client in existenc
When you call this function, the user's file descriptor will be replaced with the value of FD_MAGIC_NUMBER and their old file descriptor will be closed. This idle client will remain until it is restored with a valid file descriptor, or is removed from IRC by an operator After this call, the pointer to user will be invalid.
-Definition at line 639 of file modules.cpp.
-
-References userrec::ClearBuffer(), DEBUG, connection::fd, FD_MAGIC_NUMBER, connection::host, and userrec::ident.
00640 {
-00641 unsigned int old_fd = user->fd;
-00642 user->fd = FD_MAGIC_NUMBER;
-00643 user->ClearBuffer();
-00644 Write(old_fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,message.c_str());
-00645 #ifdef USE_KQUEUE
-00646 struct kevent ke;
-00647 EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
-00648 int i = kevent(kq, &ke, 1, 0, 0, NULL);
-00649 if (i == -1)
-00650 {
-00651 log(DEBUG,"kqueue: Failed to remove user from queue!");
-00652 }
-00653 #endif
-00654 #ifdef USE_EPOLL
-00655 struct epoll_event ev;
-00656 ev.events = EPOLLIN | EPOLLET;
-00657 ev.data.fd = old_fd;
-00658 int i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &ev);
-00659 if (i < 0)
-00660 {
-00661 log(DEBUG,"epoll: List deletion failure!");
-00662 }
-00663 #endif
-00664
-00665 shutdown(old_fd,2);
-00666 close(old_fd);
-00667 return true;
-00668 }
+Definition at line 677 of file modules.cpp.
+
+References userrec::ClearBuffer(), DEBUG, connection::fd, FD_MAGIC_NUMBER, connection::host, and userrec::ident.
00678 {
+00679 unsigned int old_fd = user->fd;
+00680 user->fd = FD_MAGIC_NUMBER;
+00681 user->ClearBuffer();
+00682 Write(old_fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,message.c_str());
+00683 #ifdef USE_KQUEUE
+00684 struct kevent ke;
+00685 EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
+00686 int i = kevent(kq, &ke, 1, 0, 0, NULL);
+00687 if (i == -1)
+00688 {
+00689 log(DEBUG,"kqueue: Failed to remove user from queue!");
+00690 }
+00691 #endif
+00692 #ifdef USE_EPOLL
+00693 struct epoll_event ev;
+00694 ev.events = EPOLLIN | EPOLLET;
+00695 ev.data.fd = old_fd;
+00696 int i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &ev);
+00697 if (i < 0)
+00698 {
+00699 log(DEBUG,"epoll: List deletion failure!");
+00700 }
+00701 #endif
+00702
+00703 shutdown(old_fd,2);
+00704 close(old_fd);
+00705 return true;
+00706 }
@@ -2948,7 +3037,7 @@ References userrec::ClearBuff