Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi is OP or not (https://www.delphipraxis.net/59699-op-not.html)

GilbertCD 27. Dez 2005 14:48


is OP or not
 
How to know if one Nick from IRC is @(OP) or not. This procedure:

Delphi-Quellcode:
{ Return True if the string Nick is a channel operator. }
function TIdIRC.IsOp(ANick: String): Boolean;
begin
  Result := (Length(Nick)>0) and (Nick[1] = '@');   {Do not Localize}
end;
is not work, be cause i`m not obtain this char '@' from AUser.Nick. Sorry for me english. :oops:

turboPASCAL 27. Dez 2005 15:24

Re: is OP or not
 
Code:
[color=green]{ Return True if the string Nick is a channel operator. }[/color]
[b][color=darkblue]function[/color][/b] TIdIRC.IsOp([b]A[/b]Nick: [b][color=darkblue]String[/color][/b]): Boolean;
[b][color=darkblue]begin[/color][/b]
  Result := (Length([b][color=#ff0000]A[/color][/b]Nick)>0) [b]and[/b] ([b][color=#ff0000]A[/color][/b]Nick[1] = '[color=blue]@[/color]');
[b][color=darkblue]end[/color];[/b]
:wink:

GilbertCD 27. Dez 2005 15:30

Re: is OP or not
 
Yes, thanks.But.. no..This function is work only if input text is: "@xxxxxx" but this '@' ? From where ? AUser.Nick ..return only nick.. :(

(Indy9 ..Delphi7 Eneterprise.)

DGL-luke 27. Dez 2005 15:59

Re: is OP or not
 
I don't think this '@' will ever be present. It is only prepended to the nick by IRC clients to show the user the OP status of someone. I haven't got Indies installed right now, but there should be something explicit somewhere. ( Something like User.Status )

But I wonder why the method you showed is a member of TIdIRC... Was it there before or did you add it? Is it a callback function? I can't figure this out from here....

GilbertCD 28. Dez 2005 14:22

Re: is OP or not
 
I`m still waitting. :( :wall:

Daniel G 28. Dez 2005 21:57

Re: is OP or not
 
Zitat:

Zitat von GilbertCD
I`m still waitting. :( :wall:

For what? For christmas? Sorry, it's already over.

DGL-Luke already told you (or better wrote) that he needs more info...


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:42 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz