This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

what's wrong ??? :/

Old posts that have not been replied to for several years.
Locked
S
SunOS

what's wrong ??? :/

Post by SunOS »

Hello guys, with this tcl I wish use multi whois with 2 bots... this is the tcl ..

Code: Select all


bind dcc m endcc dcc_whois
bind bot - aubot bot_whois

proc dcc_whois {hand idx text} {
set idx [string tolower [lindex $text 0]]
putallbots "aubot $idx"
}

proc bot_whois {hand idx arg} {
global swi_idx 
set idx [join [lrange [split $arg] 0 end]]
	dccbroadcast "#$hand# endcc $idx"
	if {$idx == ""} {
		dccbroadcast "Usage: .swhois \[server\] <nickmask>"
	} else {
		set swi_idx $idx
		swi_wibindall
                putserv "WHOIS $idx"	
}
}

#processus de whois 
proc raw:swi_wi301 {from key arg} {
global swi_idx
set awaymessage [string trimleft [join [lrange [split $arg] 2 end]] :]
	if {[valididx $swi_idx]} {
		dccbroadcast "Away         : $awaymessage"
	}
}

proc raw:swi_wi311 {from key arg} {
global swi_idx
set nick [lindex [split $arg] 1]
set username [lindex [split $arg] 2]
set hostname [lindex [split $arg] 3]
set realname [string trimleft [join [lrange [split $arg] 5 end]] :]
	if {[valididx $swi_idx]} {
		dccbroadcast "--- Whois $nick"
		dccbroadcast "Nick         : $nick"
		dccbroadcast "Realname     : $realname"
		dccbroadcast "Address      : $username@$hostname"
	}
}

proc raw:swi_wi312 {from key arg} {
global swi_idx
set server [lindex [split $arg] 2]
set serverinfo [string trimleft [join [lrange [split $arg] 3 end]] :]
	if {[valididx $swi_idx]} {
		dccbroadcast "Server       : $server"
		dccbroadcast "Serverinfo   : $serverinfo"
	}
}

proc raw:swi_wi313 {from key arg} {
global swi_idx
	if {[valididx $swi_idx]} {
		dccbroadcast "IRC Operator : yes"
	}
}

proc raw:swi_wi317 {from key arg} {
global swi_idx
set idletime [lindex [split $arg] 2]
set signontime [lindex [split $arg] 3]
	if {[catch {set idletime [duration $idletime]}]} { 
		set idletime "$idletime seconds"  
	}
	if {[valididx $swi_idx]} {
		dccbroadcast "Idle         : $idletime"
		if {[swi_isnum $signontime]} { 
			dccbroadcast "Signon time  : [ctime $signontime]" 
		}
	}
}

proc raw:swi_wi318 {from key arg} {
global swi_idx
	if {[valididx $swi_idx]} {
		dccbroadcast "--- End of Whois"
	}
	swi_wiunbindall
}

proc raw:swi_wi319 {from key arg} {
global swi_idx
set channels [string trimleft [join [lrange [split $arg] 2 end]] :]
	if {[valididx $swi_idx]} {
		dccbroadcast "Channels     : $channels"
	}
}

proc raw:swi_wi401 {from key arg} {
global swi_idx
set nick [lindex [split $arg] 1]
	if {[valididx $swi_idx]} {
		dccbroadcast "--- Whois $nick"
		dccbroadcast "No such nick/channel"
	}
}

proc raw:swi_wi402 {from key arg} {
global swi_idx
	if {[valididx $swi_idx]} {
		dccbroadcast "--- Whois"
		dccbroadcast "No such server"
		dccbroadcast "--- End of Whois"
	}
	swi_wiunbindall
}

#autres processus ...
proc swi_isnum {number} {
	if {($number != "") && (![regexp \[^0-9\] $number])} {
		return 1
	} else {
		return 0
	}
}

proc swi_wibindall { } {
	bind raw - 301 raw:swi_wi301
	bind raw - 311 raw:swi_wi311
	bind raw - 312 raw:swi_wi312
	bind raw - 313 raw:swi_wi313
	bind raw - 317 raw:swi_wi317
	bind raw - 318 raw:swi_wi318
	bind raw - 319 raw:swi_wi319
	bind raw - 401 raw:swi_wi401
	bind raw - 402 raw:swi_wi402
}

proc swi_wiunbindall { } {
	unbind raw - 301 raw:swi_wi301
	unbind raw - 311 raw:swi_wi311
	unbind raw - 312 raw:swi_wi312
	unbind raw - 313 raw:swi_wi313
	unbind raw - 317 raw:swi_wi317
	unbind raw - 318 raw:swi_wi318
	unbind raw - 319 raw:swi_wi319
	unbind raw - 401 raw:swi_wi401
	unbind raw - 402 raw:swi_wi402
}

proc swi_wwbindall { } {
	bind raw - 314 raw:swi_ww314
	bind raw - 369 raw:swi_ww369
	bind raw - 402 raw:swi_ww402
	bind raw - 406 raw:swi_ww406
}

proc swi_wwunbindall { } {
	unbind raw - 314 raw:swi_ww314
	unbind raw - 369 raw:swi_ww369
	unbind raw - 402 raw:swi_ww402
	unbind raw - 406 raw:swi_ww406
}

and i've got the message :
***(IRCNet)#InfoBot#endcc test

but the whois don't appeared in the party-line ... thank you for your help :)
User avatar
TeDDyBeeR
Voice
Posts: 21
Joined: Tue Sep 02, 2003 7:11 am

Post by TeDDyBeeR »

sorry wrong thout... i thout i saw someting :( can't delete message

regards,
TeDDyBeeR
Locked