egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

change say bot

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
pilouuu
Halfop


Joined: 26 Dec 2005
Posts: 82

PostPosted: Sat Jan 13, 2007 7:42 am    Post subject: change say bot Reply with quote

Code:
proc gf_fg {nick uhost hand chan text} {
if { [userlist |amnovf $chan] == "" } {
foreach user [userlist B|] {
set usersnick [hand2nick $user]
if { $usersnick == "" } {
putserv "NOTICE $nick :1Nickname: $usersnick"
} else {
putserv "NOTICE $nick :1Nickname: $usersnick"
}
}
putserv "NOTICE $nick :1Fthe end"
}
}


Hi

the bot say:

nickname: bla
nickname: bla2
nickname: bla3

possible to change for
nickname: bla bla2 bla3

max 5 user by line

thx for help
Back to top
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Sat Jan 13, 2007 1:31 pm    Post subject: Reply with quote

Indent your code properly next time or I won't even bother opening topics created by you.

Also, this code doesn't make much sense to me, it only executes if there is NO-ONE in the userlist for the channel, and then it proceeds to list an imaginary flag.
Back to top
View user's profile Send private message
pilouuu
Halfop


Joined: 26 Dec 2005
Posts: 82

PostPosted: Sun Jan 14, 2007 11:11 am    Post subject: Reply with quote

Code:
bind pub -|- "\!list" gf_fg

proc gf_fg {nick uhost hand chan text} {
if { [userlist |amnovf $chan] == "" } {
foreach user [userlist B|] {
set usersnick [hand2nick $user]
if { $usersnick == "" } {
putserv "NOTICE $nick :1Nickname: $usersnick"
} else {
putserv "NOTICE $nick :1Nickname: $usersnick"
}
}
putserv "NOTICE $nick :The end"
}
}



code complete...

the bot say only list user whit flags B ( expl: Admin or Botlist )
the code functions.

Just change say : <bot> nicklist1
<bot> nicklist2 etc etc

By

<bot> nicklist 1 nicklist 2 nicklist 3 etc etc (5 by line)

thx
Back to top
View user's profile Send private message
pilouuu
Halfop


Joined: 26 Dec 2005
Posts: 82

PostPosted: Mon Jan 15, 2007 7:17 pm    Post subject: Reply with quote

not possible? :/
Back to top
View user's profile Send private message
user
 


Joined: 18 Mar 2003
Posts: 1452
Location: Norway

PostPosted: Mon Jan 15, 2007 7:40 pm    Post subject: Reply with quote

Your code doesn't make sense and your question has already been answered: http://forum.egghelp.org/viewtopic.php?t=12948

(i miss the post merge button Sad)
_________________
Have you ever read "The Manual"?
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Mon Jan 15, 2007 7:48 pm    Post subject: Reply with quote

To split it to 5 nicks a line, store the output from the [userlist] to a temporary variable, run a for-loop, and use lrange to extract 5 list items from the variable. Rest would be pretty much like the code in the other thread...
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber